﻿/* =========================================
   1. Page shell / local layout
   ========================================= */

.quote-page-shell {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 800px !important;
}

/* =========================================
   2. Utility overrides used by this page
   ========================================= */

.btn-group-xs > .btn,
.btn-xs {
    padding: .25rem .4rem;
    font-size: .875rem;
    line-height: 1;
    border-radius: .2rem;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.popover {
    max-width: 60%;
}

.table th,
.table td {
    vertical-align: middle;
}

.accordion-button {
    padding-right: 3.25rem !important;
    background-color: var(--q-brand-blue);
    color: var(--q-white);
    font-size: 1rem;
    font-weight: 600;
}

.accordion-button::after {
    filter: brightness(0) invert(1);
    position: absolute;
    right: 1.25rem;
}

.accordion-button.collapsed {
    background-color: var(--q-brand-blue);
    color: var(--q-white);
}

.accordion-button:not(.collapsed) {
    background-color: var(--q-brand-blue);
    color: var(--q-white);
    box-shadow: none;
}

.accordion-item {
    border-color: rgba(60, 72, 148, 0.4) !important;
}

/* =========================================
   3. Input normalization
   ========================================= */

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.flatpickr-wrapper {
    width: 100%;
    display: inline-flex;
}

.flatpickr-input {
    width: 100%;
}

.input-group .flatpickr-input {
    flex: 1 1 auto;
}

/* =========================================
   4. Diplomat International view shell
   ========================================= */

.dipint-form-view {
    position: relative;
    z-index: 2;
    margin: 0 auto 0;
    max-width: 1100px;
    padding: 0 1rem 2rem;
    font-family: var(--q-font-family);
    color: var(--q-text);
}

.dipint-form-card {
    background: var(--q-white);
    border-radius: var(--q-radius-md);
    padding: 1.5rem 2.5rem 1.75rem;
    box-shadow: var(--q-shadow-soft);
    margin-top: -6rem; /* overlap depth; must match the hero extra padding above */
}

/* =========================================
   5. Diplomat International intro/content
   ========================================= */

.dipint-product-copy {
    margin-bottom: 2rem;
}

.dipint-product-title {
    margin: 0 0 1rem;
    font-size: 2.75rem;
    line-height: 1.1;
    font-weight: 700;
    color: var(--q-success);
}

.dipint-product-subtitle {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    line-height: 1.35;
    font-weight: 700;
    color: var(--q-brand-blue);
}

.dipint-product-summary {
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    line-height: 1.5;
    color: var(--q-text);
}

.dipint-eligibility-box {
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    background: rgba(33, 39, 126, 0.1);
    border: 1px solid var(--q-brand-blue);
    border-radius: var(--q-radius-md);
    color: var(--q-brand-blue);
    font-size: 1.125rem;
    line-height: 1.5;
    /* font-weight: 700; */
}

.dipint-form-intro {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    line-height: 1.35;
    font-weight: 400;
    color: var(--q-text);
}

.dipint-form-fields {
    margin-top: 1rem;
}

.dipint-form-row {
    margin-bottom: 1.5rem;
}

/* =========================================
   6. Diplomat International controls
   ========================================= */

.dipint-select,
.dipint-date-input,
.dipint-select-group-main {
    height: var(--q-control-height);
    min-height: var(--q-control-height);
    border: 1px solid var(--q-border);
    font-size: 16px;
    padding: 0.375rem 0.75rem;
}

.dipint-select {
    border-radius: var(--q-radius-md);
}

.dipint-date-input {
    border-radius: var(--q-radius-md) 0 0 var(--q-radius-md);
}

.dipint-select-group-main {
    border-radius: 0 var(--q-radius-md) var(--q-radius-md) 0;
    flex: 1 1 auto;
}

.dipint-select:focus,
.dipint-date-input:focus {
    border-color: var(--q-brand-blue);
    box-shadow: 0 0 0 .2rem rgba(33,39,126,.15);
}

.dipint-select-group {
    display: flex;
    width: 100%;
}

.dipint-date-group {
    display: flex;
    flex-wrap: nowrap;
}

    .dipint-date-group .dipint-date-input {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

.dipint-addon-btn {
    width: var(--q-addon-width);
    min-width: var(--q-addon-width);
    height: var(--q-control-height);
    border: 1px solid var(--q-brand-blue);
    background: rgba(33, 39, 126, 0.05);
    color: var(--q-brand-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: none;
}

    .dipint-addon-btn:hover,
    .dipint-addon-btn:focus {
        background: rgba(33, 39, 126, 0.12);
        color: var(--q-brand-blue);
        box-shadow: none;
    }

.dipint-info-btn {
    border-right: 0;
    border-radius: var(--q-radius-md) 0 0 var(--q-radius-md);
}

.dipint-date-btn {
    border-left: 0;
    border-radius: 0 var(--q-radius-md) var(--q-radius-md) 0;
}

.dipint-helper-text {
    margin-top: .4rem;
    font-size: .875rem;
    line-height: 1.4;
    color: var(--q-text);
}

.dipint-age-input {
    width: 60px !important;
    min-width: 60px;
    max-width: 60px;
    height: var(--q-control-height);
    min-height: var(--q-control-height);
    border: 1px solid var(--q-border);
    border-radius: var(--q-radius-md);
    font-size: 16px;
    padding: 0.375rem 0.5rem;
    text-align: center;
}

    .dipint-age-input:focus {
        border-color: var(--q-brand-blue);
        box-shadow: 0 0 0 .2rem rgba(33,39,126,.15);
    }

/* =========================================
   7. Diplomat International action area
   ========================================= */

.dipint-nav-wrap {
    margin-top: 2rem;
    padding: 1rem;
    background: var(--q-light-bg);
    border-radius: var(--q-radius-md);
}

.dipint-btn-next {
    min-width: 207px;
    min-height: 42px;
    border-radius: var(--q-radius-sm);
    background: var(--q-accent-orange);
    border-color: var(--q-accent-orange);
    color: var(--q-white);
    font-weight: 600;
    font-size: 1rem;
}

    .dipint-btn-next:hover,
    .dipint-btn-next:focus {
        background: #dc7418;
        border-color: #dc7418;
        color: var(--q-white);
    }

/* =========================================
8. (Responsive rules consolidated at end of file)
========================================= */

/* =========================================
   4A. Page title / hero / progress
   ========================================= */

.dipint-hero {
    background: var(--q-brand-blue);
    color: var(--q-white);
    padding: 2.5rem 0 2.75rem;
    margin-bottom: 0; /* stop using negative margin for overlap */
    padding-bottom: calc(2.75rem + 6rem); /* existing bottom padding + overlap depth */
}

.dipint-hero__inner {
    max-width: 1236px;
    margin: 0 auto;
    padding: 0 1rem;
}

.dipint-hero__title {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 5.25rem);
    line-height: 0.95;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--q-white);
}

.dipint-hero__subtitle {
    margin: 1rem 0 0;
    font-size: clamp(1.125rem, 2vw, 1.5625rem);
    line-height: 1.3;
    font-weight: 400;
    color: var(--q-white);
}

.dipint-progress-wrap {
    margin-top: 0;
    margin-bottom: 2rem;
    background: var(--q-light-bg);
    border-radius: var(--q-radius-md);
    padding: 0;
    overflow: hidden;
    box-shadow: var(--q-shadow-soft);
}

.dipint-progress {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-height: 71px;
}

.dipint-progress__step {
    position: relative;
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 71px;
    padding: 0 1rem;
    font-size: 1.125rem;
    line-height: 1.2;
    font-weight: 400;
    text-align: center;
    color: var(--q-white);
    --dipint-step-bg: var(--q-step-gray);
    background: var(--dipint-step-bg);
    z-index: 1;
}

    .dipint-progress__step:first-child {
        border-radius: var(--q-radius-md) 0 0 var(--q-radius-md);
    }

    .dipint-progress__step:last-child {
        border-radius: 0 var(--q-radius-md) var(--q-radius-md) 0;
    }

    .dipint-progress__step:not(:last-child) {
        margin-right: 10px;
    }

    .dipint-progress__step.is-current,
    .dipint-progress__step.is-complete {
        --dipint-step-bg: var(--q-brand-blue);
        background: var(--dipint-step-bg);
    }

    .dipint-progress__step.is-finish-complete {
        --dipint-step-bg: var(--q-accent-orange);
        background: var(--dipint-step-bg);
    }

    /* Colored arrow: solid rectangle covering the step's right edge + arrow tip.
       Element is 30px wide, right:-24px → left edge is 6px inside the step box.
       The rectangle portion (0%-20%) fills the step right edge at every zoom level
       (no transparent corner nicks); the taper (20%-100%) forms the visible arrow. */
    .dipint-progress__step:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 0;
        right: -24px;
        width: 30px;
        height: 100%;
        background: var(--dipint-step-bg);
        clip-path: polygon(0% 0%, 20% 0%, 100% 50%, 20% 100%, 0% 100%);
        z-index: 3;
    }

    .dipint-progress__step:not(:first-child) {
        padding-left: 2em;
    }

    /* White chevron divider: full-height right-pointing triangle on each step's left edge */
    .dipint-progress__step:not(:first-child)::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 25px;
        height: 100%;
        background: var(--q-light-bg);
        clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
        z-index: 2;
    }

    .dipint-progress__step.is-current {
        background: var(--q-brand-blue);
        color: var(--q-white);
    }

    .dipint-progress__step.is-complete {
        background: var(--q-brand-blue);
        color: var(--q-white);
    }

    .dipint-progress__step.is-finish {
        color: var(--q-text);
    }

    .dipint-progress__step.is-finish-complete {
        background: var(--q-accent-orange);
        color: var(--q-white);
    }

.dipint-progress__step:nth-child(1) { z-index: 80; }
.dipint-progress__step:nth-child(2) { z-index: 70; }
.dipint-progress__step:nth-child(3) { z-index: 60; }
.dipint-progress__step:nth-child(4) { z-index: 50; }
.dipint-progress__step:nth-child(5) { z-index: 40; }
.dipint-progress__step:nth-child(6) { z-index: 30; }
.dipint-progress__step:nth-child(7) { z-index: 20; }
.dipint-progress__step:nth-child(8) { z-index: 10; }

@media (max-width: 991.98px) {
    .dipint-hero {
        padding: 2rem 0 2.25rem;
        padding-bottom: calc(2.25rem + 4.5rem);
        margin-bottom: 0;
    }

    .dipint-form-card {
        margin-top: -4.5rem;
    }

    .dipint-product-title {
        font-size: 2.15rem;
    }

    .dipint-product-subtitle,
    .dipint-form-intro {
        font-size: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .dipint-hero__subtitle {
        margin-top: 0.75rem;
    }

    .dipint-progress__step {
        flex: 1 1 calc(50% - 0.5rem);
        font-size: 0.9375rem;
        padding: 0.75rem;
    }

    .dipint-quote-row {
        flex-direction: column;
        min-height: auto;
        line-height: 1.5;
        padding: 0.5rem 0;
    }

    .dipint-quote-value {
        flex: 1 1 auto;
        padding-left: 0;
        margin-top: 0.25rem;
    }
}

/* =========================================
   9. Bootstrap 5 validation overrides
   ========================================= */

/* Red border on invalid controls inside the dipint form */
.dipint-form-fields .is-invalid.dipint-select,
.dipint-form-fields .is-invalid.dipint-date-input,
.dipint-form-fields .is-invalid.dipint-select-group-main,
.dipint-form-fields .is-invalid.dipint-age-input,
.dipint-form-fields .is-invalid.form-select,
.dipint-form-fields .is-invalid.form-control {
    border-color: var(--bs-danger, #dc3545);
    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .15);
}


/* Show sibling .invalid-feedback when the control has .is-invalid */
.dipint-form-fields .is-invalid ~ .invalid-feedback,
.dipint-form-fields .dipint-select-group:has(.is-invalid) ~ .invalid-feedback {
    display: block !important;
    color: var(--bs-danger, #dc3545);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Styled summary alert at the bottom of the form section */
.dipint-validation-alert:not(:empty) {
    display: block;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: var(--q-radius-md);
    color: var(--bs-danger, #dc3545);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.dipint-validation-alert:empty {
    display: none;
}

.dipint-validation-alert ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* Info notification — state change, not an error */
.dipint-notification {
    display: block;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    background: rgba(13, 110, 253, 0.08);
    border: 1px solid rgba(13, 110, 253, 0.3);
    border-radius: var(--q-radius-md);
    color: var(--bs-primary, #0d6efd);
    font-size: 0.9375rem;
    line-height: 1.5;
}

/* =========================================
   13. Stepper: hover-expand step labels
   ========================================= */

/* Turn each step into a flex row for number + label layout */
.dipint-progress__step {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: flex 0.35s ease;
}

/* The step number — always visible, never shrinks */
.dipint-progress__step-num {
    flex-shrink: 0;
    font-weight: 700;
    line-height: 1;
}

/* The step label — hidden by default via max-width collapse */
.dipint-progress__step-label {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    font-size: 0.9375rem;
    font-weight: 400;
    vertical-align: middle;
    transition: max-width 0.35s ease, opacity 0.25s ease, margin-left 0.35s ease;
}

/* When any step is hovered, shrink all non-hovered steps */
.dipint-progress:has(.dipint-progress__step:hover) .dipint-progress__step:not(:hover) {
    flex: 0 1 0;
}

/* Expand the hovered step to accommodate the label */
.dipint-progress .dipint-progress__step:hover {
    flex: 6 1 0;
}

/* Slide the label in on hover */
.dipint-progress__step:hover .dipint-progress__step-label {
    max-width: 200px;
    opacity: 1;
    margin-left: 0.5em;
}

/* Active/current step is expanded by default */
.dipint-progress__step.is-current {
    flex: 6 1 0;
}

/* Show current step label even without hover */
.dipint-progress__step.is-current .dipint-progress__step-label {
    max-width: 200px;
    opacity: 1;
    margin-left: 0.5em;
}

/* Make current step text larger */
.dipint-progress__step.is-current .dipint-progress__step-num {
    font-size: 1.35rem;
}

.dipint-progress__step.is-current .dipint-progress__step-label {
    font-size: 1.15rem;
    font-weight: 600;
}

/* =========================================
   10. Agent information box (vwQuoteEntry)
   ========================================= */

.dipint-agent-box {
    margin-top: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: var(--q-radius-md);
    background: var(--q-light-bg, #f8f9fa);
}

.dipint-agent-box__title {
    margin-bottom: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--q-brand-blue);
}

/* =========================================
   11. Back button (nav-wrap pair)
   ========================================= */

.dipint-btn-back {
    min-width: 140px;
    min-height: 42px;
    border-radius: var(--q-radius-sm);
    background: var(--q-white, #fff);
    border: 1px solid var(--q-brand-blue);
    color: var(--q-brand-blue);
    font-weight: 600;
    font-size: 1rem;
}

    .dipint-btn-back:hover,
    .dipint-btn-back:focus {
        background: rgba(33, 39, 126, 0.08);
        border-color: var(--q-brand-blue);
        color: var(--q-brand-blue);
    }

/* =========================================
   12. Quote results accordion (Figma Screen 3)
   ========================================= */

#quoteResults .accordion-button {
    background: var(--q-brand-blue);
    color: var(--q-white);
    border: 1px solid var(--q-brand-blue);
    border-radius: var(--q-radius-md) var(--q-radius-md) 0 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5rem;
    min-height: 52px;
    padding-right: 3.25rem !important;
}

#quoteResults .accordion-button.collapsed {
    border-radius: var(--q-radius-md);
}

#quoteResults .accordion-button::after {
    filter: brightness(0) invert(1);
}

#quoteResults .accordion-button b {
    color: var(--q-white);
}

#quoteResults .accordion-body {
    background: var(--q-light-bg);
    border: 1px solid rgba(60, 72, 148, 0.4);
    border-top: 0;
    border-radius: 0 0 var(--q-radius-md) var(--q-radius-md);
    padding: 1.25rem;
}

.dipint-quote-card {
    background: var(--q-white);
    border-radius: var(--q-radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.dipint-quote-card:last-child {
    margin-bottom: 0;
}

.dipint-quote-row {
    display: flex;
    align-items: baseline;
    min-height: 48px;
    padding: 0;
    border-bottom: 1px solid rgba(30, 30, 30, 0.1);
    font-size: 1.25rem;
    line-height: 3rem;
}

.dipint-quote-row:last-child {
    border-bottom: none;
}

.dipint-quote-label {
    flex: 1 1 60%;
    font-weight: 600;
    color: var(--q-text);
}

.dipint-quote-value {
    flex: 0 0 40%;
    padding-left: 1rem;
    background: var(--q-light-bg);
    border-radius: var(--q-radius-md);
    font-weight: 400;
    color: var(--q-text);
}

.dipint-quote-row--total .dipint-quote-value {
    font-weight: 700;
}

/* Large agreement checkbox — matches reCAPTCHA checkbox size */
.dipint-agreement-check input[type="checkbox"] {
    width: 1.75rem;
    height: 1.75rem;
    min-width: 1.75rem;
    cursor: pointer;
    accent-color: var(--q-primary, #0d6efd);
    flex-shrink: 0;
}

/* Disabled state for Submit Payment */
.btn.dipint-btn-next:disabled,
.btn.dipint-btn-next[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: auto;
}