/* Editing Inquiry Form — page-scoped styles (editing-inquiry-form.htm only).
   Visual tokens (colors/spacing/fonts) matched against the live reference form at
   https://www.enago.com/quotation-alt.htm, translated from its Bootstrap 3 markup.
   (form-horizontal / .control-label / plain .checkbox) */

/* ============================================================================
   PAGE WRAPPER
   ============================================================================ */
.eif-page {
    background: #F4F4F4;
    padding: 30px 0 60px;
}

.eif-breadcrumb {
    font-size: 13px;
    color: #777;
    margin-bottom: 10px;
}

.eif-breadcrumb a {
    color: #777;
}

.eif-page h1.eif-title {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 27px;
    color: #000;
}

/* ============================================================================
   CARDS  (gate + steps + sidebar)
   ============================================================================ */
.eif-gate,
.eif-step,
.eif-summary {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: 4px;
    box-shadow: 0 0 4.5px rgba(0, 0, 0, .09);
}

/* ---- Gate card ---- */
.eif-gate {
    padding: 20px;
    margin-bottom: 20px;
}

.eif-gate p {
    margin-bottom: 14px;
}

.eif-gate .eif-gate-options {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.eif-gate label {
    font-weight: 400;
    font-size: 16px;
    cursor: pointer;
    margin-bottom: 0;
    line-height: 1.5;
}

.eif-gate label input {
    margin-right: 6px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* ============================================================================
   STEP CARDS
   ============================================================================ */
.eif-steps {
    display: none;
}

.eif-step {
    margin-bottom: 20px;
    overflow: hidden;
}

.eif-step-head {
    padding: 14px 20px;
    cursor: default;
    border-bottom: 1px solid transparent; /* reserve height; shown when active */
}

.eif-step.is-active .eif-step-head {
    border-bottom-color: #eaeaea;
}

.eif-step.is-done .eif-step-head {
    cursor: pointer;
}

/* Step heading */
.eif-step-title {
    font-size: 20px;
    font-weight: 600;
    color: #212529;
    margin: 0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Bullet indicator circle */
.eif-step-title:before {
    content: "";
    display: inline-block;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 4px solid #D52B1E;
    border-radius: 50%;
}

.eif-step.is-done .eif-step-title:before {
    background: #4CAF50;
    border-color: #4CAF50;
}

.eif-step-num {
    font-weight: 700;
    white-space: nowrap;
}

/* ---- Step body ---- */
.eif-step-body {
    padding: 20px 20px 12px;
    display: none;
}

.eif-step.is-active .eif-step-body {
    display: block;
}

/* ============================================================================
   FORM-HORIZONTAL ROWS
   (label col-sm-4 + field col-sm-8)
   ============================================================================ */

/* overflow:hidden acts as a clearfix for the floated Bootstrap grid columns */
.eif-step-body .form-group {
    border-bottom: 1px solid #eaeaea;
    padding-top: 12px;
    padding-bottom: 12px;
    margin-bottom: 0;
    overflow: hidden; /* clearfix for floated col-sm-* children */
}

/* Remove bottom border on the last group and any explicitly marked group */
.eif-step-body .form-group:last-child,
.eif-step-body .form-group.no-divider {
    border-bottom: none;
    padding-bottom: 6px;
}

/* Control labels — vertically centred with height:38px inputs.
   (38px input - ~21px line-height) / 2 = ~8.5 â†’ round to 9px */
.eif-step-body .control-label {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
    text-align: left;
    padding-top: 9px;
    line-height: 1.4;
}

.required {
    color: #D52B1E;
    margin-left: 1px;
}

/* Inputs & selects */
.eif-field .form-control,
.eif-step-body .form-control {
    box-shadow: none;
    border: 1px solid #ced4da;
    border-radius: 4px;
    height: 38px;
    font-size: 15px;
    color: #212529;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.eif-field .form-control:focus,
.eif-step-body .form-control:focus {
    border-color: #D52B1E;
    box-shadow: 0 0 0 3px rgba(213, 43, 30, .12);
    outline: none;
}

textarea.form-control {
    height: auto;
    min-height: 90px;
    resize: vertical;
}

/* File input is naturally taller; let it size itself */
input[type="file"].form-control {
    height: auto;
    padding: 5px 10px;
    line-height: 1.6;
}

.eif-field .help-text,
.help-text {
    font-size: 12.5px;
    color: #6c757d;
    margin-top: 5px;
    margin-bottom: 0;
    line-height: 1.5;
}

.eif-hidden {
    display: none !important;
}

/* ============================================================================
   CASCADING SELECTS  (Main Subject â†’ Sub-Subject â†’ Specialization)
   ============================================================================ */
.eif-stacked-selects .form-control {
    margin-bottom: 8px;
}

.eif-stacked-selects .form-control:last-child {
    margin-bottom: 0;
}

/* ============================================================================
   CHECKBOXES  (add-ons / free services)
   Bootstrap 3 plain .checkbox style
   ============================================================================ */
.eif-addon-list {
    padding-top: 2px; /* optical alignment with label padding-top */
}

.eif-addon-list .checkbox {
    margin-top: 0;
    margin-bottom: 8px;
}

.eif-addon-list .checkbox:last-child {
    margin-bottom: 0;
}

.eif-addon-list .checkbox label {
    font-weight: 400;
    font-size: 15px;
    color: #212529;
    cursor: pointer;
    padding-left: 22px;
    line-height: 1.5;
}

.eif-addon-list .checkbox input[type="checkbox"] {
    margin-left: -22px;
    margin-top: 3px; /* aligns the box with the first line of label text */
}

.eif-addon-note {
    color: #6c757d;
    font-size: 12.5px;
    margin-left: 4px;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.eif-btn-next,
.eif-btn-submit,
.eif-btn-gate {
    background-color: #D52B1E;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 7px 24px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color .15s ease;
}

.eif-btn-next:hover,
.eif-btn-submit:hover,
.eif-btn-gate:hover {
    background-color: #b8241a;
    color: #fff;
}

.eif-btn-gate[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

.eif-btn-back {
    background-color: #6B6A6A;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 7px 24px;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: background-color .15s ease;
}

.eif-btn-back:hover {
    background-color: #565555;
    color: #fff;
}

/* ---- Step action bar ---- */
/* Use flex so Back (left) and Next (right) are properly separated
   without relying on float, which would collapse the container. */
.eif-step-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #eaeaea;
}

.eif-step-actions .eif-btn-back {
    margin-right: auto; /* pushes the back button all the way to the left */
}

/* Error message shown above the action bar */
.eif-error {
    color: #D52B1E;
    font-size: 13px;
    margin: 8px 0 0;
    display: none;
}

/* ============================================================================
   KEEP-UPDATED CHECKBOX & TERMS LINE
   ============================================================================ */
.eif-keep-updated-label {
    font-weight: 400;
    font-size: 14px;
    color: #212529;
    cursor: pointer;
    line-height: 1.5;
}

.eif-keep-updated-label input {
    margin-right: 6px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

.eif-terms-text {
    font-size: 12.5px;
    color: #6c757d;
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.5;
}

.eif-terms-text a {
    color: #D52B1E;
    text-decoration: underline;
}

/* ============================================================================
   ORDER SUMMARY SIDEBAR
   ============================================================================ */
.eif-summary {
    padding: 20px;
    position: sticky;
    top: 20px;
}

.eif-summary h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eaeaea;
    color: #212529;
}

.eif-summary-block {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f4f4f4;
}

.eif-summary-block:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.eif-summary-block .lbl {
    display: block;
    color: #6c757d;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}

.eif-summary-block .val {
    display: block;
    font-weight: 600;
    color: #212529;
    font-size: 14px;
    line-height: 1.4;
}

.eif-summary-subhead {
    font-weight: 700;
    font-size: 12px;
    color: #212529;
    margin: 14px 0 5px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.eif-summary-subhead--sm {
    font-weight: 600;
    font-size: 11.5px;
    color: #6c757d;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 10px;
}

.eif-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    padding: 3px 0;
    color: #212529;
    gap: 8px;
}

.eif-summary-row .lbl {
    flex: 1;
    min-width: 0;
}

/* Names the offer behind a discount row, e.g. "Total Discount (Launch Offer 20%)". Muted and
   smaller so the row still reads as one label, matching .eif-addon-note's treatment. */
.eif-offer-name {
    color: #6c757d;
    font-size: 12.5px;
    font-weight: 400;
}

.eif-summary-row .val {
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.eif-summary-divider {
    border: none;
    border-top: 1px solid #eaeaea;
    margin: 10px 0;
}

.eif-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    padding: 4px 0;
    color: #212529;
}

.eif-summary-note {
    font-size: 12px;
    color: #999;
    margin-top: 14px;
    margin-bottom: 0;
    line-height: 1.5;
    font-style: italic;
}

.eif-summary-quote-msg {
    font-size: 13px;
    background: #FFF7E0;
    border: 1px solid #F0D98A;
    border-radius: 4px;
    padding: 10px 12px;
    margin-top: 10px;
    display: none;
    line-height: 1.5;
}

/* ============================================================================
   INLINE FIELD VALIDATION
   Triggered by JavaScript when a field fails validation — error message appears
   directly below the field, field is highlighted with a light pink/red tint.
   ============================================================================ */

/* Invalid field highlight */
.eif-step-body .form-control.eif-field-error,
.eif-field .form-control.eif-field-error {
    border-color: #D52B1E;
    background-color: #fff8f7;
    box-shadow: 0 0 0 3px rgba(213, 43, 30, .10);
}

/* Inline error message — appears immediately below the .form-control */
.eif-field-msg {
    color: #D52B1E;
    font-size: 12.5px;
    font-weight: 500;
    margin-top: 5px;
    margin-bottom: 0;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 4px;
    animation: eif-shake .25s ease;
}

/* Small warning icon prepended via CSS */
.eif-field-msg::before {
    content: "⚠";
    font-size: 11px;
    flex-shrink: 0;
}

/* Subtle shake animation on the message so it catches the eye */
@keyframes eif-shake {
    0%   { transform: translateX(0); }
    25%  { transform: translateX(-4px); }
    50%  { transform: translateX(4px); }
    75%  { transform: translateX(-3px); }
    100% { transform: translateX(0); }
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 767px) {
    .eif-summary {
        position: static;
        margin-top: 20px;
    }

    .eif-step-title {
        font-size: 17px;
    }

    .eif-step-head {
        padding: 12px 15px;
    }

    .eif-step-body {
        padding: 14px 15px 8px;
    }

    .eif-gate {
        padding: 16px;
    }

    .eif-gate .eif-gate-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* On mobile the labels stack above fields, so remove top-padding alignment */
    .eif-step-body .control-label {
        padding-top: 0;
        margin-bottom: 4px;
    }

    /* Buttons go full-width and stack, Back on bottom */
    .eif-step-actions {
        flex-wrap: wrap;
    }

    .eif-btn-next,
    .eif-btn-submit,
    .eif-btn-back,
    .eif-btn-gate {
        width: 100%;
        text-align: center;
        padding: 9px 20px;
    }

    .eif-step-actions .eif-btn-back {
        margin-right: 0;
        order: 2;
    }

    .eif-step-actions .eif-btn-next,
    .eif-step-actions .eif-btn-submit {
        order: 1;
    }
}
