/* ============================================================
 * Complaint Wizard (start.php / steps.php / forms/step1-7.php)
 * Styled to match the MOCI theme design tokens defined in
 * css_36SX81...css (--main-color, --bg-body, --bg-section, ...)
 * Scoped under .contact-us so it never leaks onto other pages
 * that also use .form-control / .btn / .row.
 * ============================================================ */

.contact-us {
    padding: var(--section-padding-top, 4rem) 0 4rem;
}

.contact-us .container-sm {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ------------------------------------------------------------
 * Step indicator
 * ------------------------------------------------------------ */

.contact-us .steps {
    margin-bottom: 32px;
}

.contact-us .steps ul {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    list-style: none;
    margin: 0;
    padding: 0;
}

.contact-us .steps li {
    position: relative;
    flex: 1;
    text-align: center;
    padding-top: 44px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-card-description, #4b5563);
}

/* connecting line */
.contact-us .steps li::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--line, #e5e7eb);
    z-index: 0;
}

.contact-us .steps li:first-child::before {
    display: none;
}

/* step number bubble */
.contact-us .steps li span {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    line-height: 32px;
    border-radius: 50%;
    background: var(--bg-section, #f9fafb);
    border: 2px solid var(--line, #e5e7eb);
    color: var(--color-card-description, #4b5563);
    font-size: 14px;
    z-index: 1;
    transition: var(--transition, 0.2s ease-in-out);
}

.contact-us .steps li.current {
    color: var(--main-color, #8a1538);
}

.contact-us .steps li.current span {
    background: var(--main-color, #8a1538);
    border-color: var(--main-color, #8a1538);
    color: #fff;
}

/* fill the connecting line up to the current step */
.contact-us .steps li.current::before {
    background: var(--main-color, #8a1538);
}

body.dark-mode .contact-us .steps li {
    color: var(--color-card-description, #9ca3af);
}

body.dark-mode .contact-us .steps li span {
    background: var(--bg-section, #1f2937);
    border-color: var(--line, #374151);
}

@media (max-width: 576px) {
    .contact-us .steps li {
        font-size: 11px;
        padding-top: 40px;
    }

    .contact-us .steps li span {
        width: 28px;
        height: 28px;
        line-height: 28px;
    }

    .contact-us .steps li::before {
        top: 14px;
    }
}

/* ------------------------------------------------------------
 * Form card
 * ------------------------------------------------------------ */

.contact-us #forum_r {
    background: var(--bg-card-sections, #ffffff);
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 16px;
    padding: 28px 24px;
}

body.dark-mode .contact-us #forum_r {
    background: var(--bg-section, #1f2937);
    border-color: var(--line, #374151);
}

.contact-us .form-group {
    margin-bottom: 18px;
}

.contact-us label,
.contact-us .control-label2 {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-card-title, #020817);
}

.contact-us .required-label {
    display: flex;
    align-items: center;
    gap: 4px;
}

body.dark-mode .contact-us label,
body.dark-mode .contact-us .control-label2 {
    color: var(--color-card-title, #f9fafb);
}

.contact-us .form-control,
.contact-us .govsa-input-text,
.contact-us select.form-control {
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 12px;
    background: var(--bg-body, #ffffff);
    color: var(--color-card-title, #020817);
    font-size: 15px;
    line-height: 20px;
    transition: var(--transition, 0.2s ease-in-out);
}

.contact-us .form-control:focus {
    outline: none;
    border-color: var(--main-color, #8a1538);
    box-shadow: 0 0 0 3px rgba(138, 21, 56, 0.12);
}

.contact-us .form-control::placeholder {
    color: var(--color-card-description, #4b5563);
}

body.dark-mode .contact-us .form-control {
    background: var(--bg-body, #111827);
    color: var(--color-card-title, #f9fafb);
    border-color: var(--line, #374151);
}

.contact-us input[type="file"].form-control {
    padding: 10px 14px;
}

.contact-us .form-control:hover:not(:focus):not(:disabled) {
    border-color: var(--line-2, #d1d5db);
}

.contact-us .form-control:disabled,
.contact-us .form-control[readonly] {
    background: var(--bg-section, #f9fafb);
    color: var(--color-card-description, #4b5563);
    cursor: not-allowed;
}

.contact-us .form-control:-webkit-autofill,
.contact-us .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--color-card-title, #020817);
    -webkit-box-shadow: 0 0 0 1000px var(--bg-body, #ffffff) inset;
    transition: background-color 9999s ease-in-out 0s;
}

.contact-us textarea.form-control {
    min-height: 120px;
    padding-top: 12px;
    resize: vertical;
}

/* Keep required markers independent from global .req and form-control styles. */
.contact-us .req {
    all: unset;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    color: var(--main-color, #8a1538);
    font: inherit;
    line-height: 1;
    margin-inline-start: 4px;
}

/* two-up layout for related fields (name + id, phone + email, ...) */
.contact-us .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.contact-us .form-row .form-group {
    min-width: 0;
}

@media (max-width: 576px) {
    .contact-us .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* select: custom chevron instead of the native arrow */
.contact-us select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-inline-end: 40px;
    background-repeat: no-repeat;
    background-position: left 16px center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%234b5563' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* icon inside a field: wrap the input in <div class="input-icon"><i class="bi ..."></i><input ...></div> */
.contact-us .input-icon {
    position: relative;
}

.contact-us .input-icon > i {
    position: absolute;
    inset-inline-start: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-card-description, #4b5563);
    font-size: 16px;
    pointer-events: none;
}

.contact-us .input-icon > .form-control {
    padding-inline-start: 42px;
}

/* ------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------ */

.contact-us .button-row,
.contact-us .form-buttons {
    margin-top: 24px;
    text-align: center;
}

.contact-us .btn,
.contact-us .btn-default,
.contact-us .btn-primary,
.contact-us .btn-darkBlue {
    display: inline-block;
    padding: 14px 40px;
    background-color: var(--main-color, #8a1538);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: var(--font-size-btn, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition, 0.2s ease-in-out);
}

.contact-us .btn:hover,
.contact-us .btn-default:hover,
.contact-us .btn-primary:hover,
.contact-us .btn-darkBlue:hover {
    filter: brightness(0.92);
    color: #fff;
}

/* ------------------------------------------------------------
 * Confirmation / OTP screens (register-form, form-title, ...)
 * ------------------------------------------------------------ */

.contact-us .register-form {
    text-align: center;
}

.contact-us .form-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-card-title, #020817) !important;
    margin-bottom: 12px;
}

.contact-us .form-title-small-content {
    margin-bottom: 16px;
}

.contact-us .form-title-small {
    font-size: 14px;
    color: var(--color-card-description, #4b5563) !important;
}

body.dark-mode .contact-us .form-title,
body.dark-mode .contact-us .form-title-small {
    color: var(--color-card-title, #f9fafb) !important;
}

/* ------------------------------------------------------------
 * File upload group boxes (step3)
 * ------------------------------------------------------------ */

.contact-us .upload-box {
    border: 1px dashed var(--line, #e5e7eb);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.contact-us .upload-box h2 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line, #e5e7eb);
    color: var(--color-card-title, #020817);
}

/* ------------------------------------------------------------
 * Alerts (Bootstrap .alert from $error, plus .alert-message)
 * ------------------------------------------------------------ */

.contact-us .alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-right: 4px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.7;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    animation: alert-pop 0.25s ease-out;
}

.contact-us .alert::before {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    color: #fff;
}

.contact-us .alert-danger {
    background: #fdecec;
    border-color: #f6c6c6;
    border-right-color: #d83c3c;
    color: #8a1f1f;
}

.contact-us .alert-danger::before {
    content: "!";
    background: #d83c3c;
}

.contact-us .alert-success {
    background: #eaf7ea;
    border-color: #c7e8c7;
    border-right-color: #2e8b2e;
    color: #1e5c1e;
}

.contact-us .alert-success::before {
    content: "\2713";
    background: #2e8b2e;
}

.contact-us .alert-warning {
    background: #fff8e8;
    border-color: #f2e2b4;
    border-right-color: #c99a1f;
    color: #7a5c0d;
}

.contact-us .alert-warning::before {
    content: "!";
    background: #c99a1f;
}

body.dark-mode .contact-us .alert-danger {
    background: rgba(216, 60, 60, 0.12);
    border-color: rgba(216, 60, 60, 0.35);
    color: #f6b8b8;
}

body.dark-mode .contact-us .alert-success {
    background: rgba(46, 139, 46, 0.14);
    border-color: rgba(46, 139, 46, 0.35);
    color: #b9e6b9;
}

@keyframes alert-pop {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* inline field-level error (e.g. OTP code) */
/*
 * NOTE: CSS :empty matches "no child nodes at all" — an element that
 * contains only whitespace (e.g. "<p class=\"alert-message\"> </p>")
 * is NOT :empty. Don't gate a visible box on :not(:empty) here, or a
 * stray space in the markup makes the alert render with nothing to say.
 * Instead: hide it only when truly empty, keep the rest plain text.
 */
.contact-us .alert-message {
    font-size: 13px;
    font-weight: 600;
    color: #d83c3c;
    margin: 6px 0 0;
}

.contact-us .alert-message:empty {
    display: none;
    margin: 0;
}

/* ------------------------------------------------------------
 * Result states (ok_order / no_order)
 * ------------------------------------------------------------ */

.contact-us #ok_order,
.contact-us #no_order {
    border-radius: 16px;
    padding: 28px 20px;
    margin-bottom: 20px;
}

.contact-us #ok_order {
    background: #eaf7ea;
    border: 1px solid #c7e8c7;
}

.contact-us #no_order {
    background: #fdecec;
    border: 1px solid #f6c6c6;
}

.contact-us #ok_order p,
.contact-us #no_order p {
    font-size: 15px;
    color: var(--color-card-title, #020817);
    line-height: 1.8;
}

.contact-us #ok_order img,
.contact-us #no_order img {
    margin-top: 8px;
}
