/* ─────────────────────────────────────────────────────────────────────────
   customer-info.css
   "Información del cliente" panel — third screen in the horizontal slide chain.
   Shares the same slide-in-from-right / slide-out-to-left pattern as
   vehicle-select.css. No new overlay; everything lives inside .bt-screen.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Panel shell ──────────────────────────────────────────────────────────
   Identical positioning contract to .vs-panel: absolute, full bleed,
   starts off-screen right, slides in via .ci-panel--active.             */

.ci-panel {
    position: absolute;
    inset: 0;
    z-index: 3;                          /* above vs-panel (z:2) */
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;                    /* inner scroll handled per-section */
    will-change: transform;
}

.ci-panel--active {
    transform: translateX(0);
}

/* When ci-panel is open, also freeze vs-panel's scroll */
.vs-panel--slide-out {
    transform: translateX(-100%);
    pointer-events: none;
}

/* ── Sticky header ────────────────────────────────────────────────────────*/

.ci-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #f0f0f4;
    flex-shrink: 0;
}

.ci-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid #e0e0eb;
    background: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    color: #333;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.ci-back-btn:hover,
.ci-back-btn:focus-visible {
    background: #f4f0ff;
    border-color: var(--page-red-seam);
    outline: none;
}

.ci-header-title {
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.01em;
}

/* ── Scrollable body ──────────────────────────────────────────────────────*/

.ci-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ── Order recap strip ────────────────────────────────────────────────────*/

.ci-recap {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    background: #f7f5ff;
    border-radius: 14px;
    padding: 0.75rem 1rem;
}

.ci-recap-img {
    width: 64px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
}

.ci-recap-info {
    flex: 1;
    min-width: 0;
}

.ci-recap-name {
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ci-recap-extras {
    font-size: 0.75rem;
    color: var(--page-red-seam);
    margin: 0 0 0.15rem;
    font-weight: 500;
}

.ci-recap-total {
    font-size: 0.8rem;
    color: #555;
    margin: 0;
}

.ci-recap-total strong {
    color: #1a1a2e;
    font-weight: 700;
}

/* ── Section group ────────────────────────────────────────────────────────*/

.ci-section-title {
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #999;
    margin: 0 0 0.75rem;
}

.ci-fields {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

/* ── Field wrapper ────────────────────────────────────────────────────────*/

.ci-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ci-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #444;
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
}

.ci-label abbr {
    color: var(--page-red-seam);
    text-decoration: none;
    margin-left: 2px;
}

.ci-input,
.ci-select {
    width: 100%;
    box-sizing: border-box;
    padding: 0.7rem 0.875rem;
    border: 1.5px solid #e0e0eb;
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    color: #1a1a2e;
    background: #fff;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s;
    appearance: none;
    -webkit-appearance: none;
}

.ci-input:focus,
.ci-select:focus {
    border-color: var(--page-red-seam);
    box-shadow: 0 0 0 3px rgba(220, 5, 4, 0.12);
}

.ci-input.ci-input--error,
.ci-select.ci-select--error {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

.ci-error-msg {
    font-size: 0.72rem;
    color: #e53935;
    display: none;
}

.ci-field--invalid .ci-error-msg {
    display: block;
}

.ci-field--invalid .ci-input,
.ci-field--invalid .ci-select {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
}

/* Select arrow */
.ci-select-wrap {
    position: relative;
}

.ci-select-wrap::after {
    content: "▾";
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: var(--page-red-seam);
    pointer-events: none;
}

/* Row of two fields side-by-side */
.ci-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* ── Phone row (flag + number) ────────────────────────────────────────────*/

.ci-phone-wrap {
    display: flex;
    gap: 0.5rem;
}

.ci-phone-prefix {
    width: 90px;
    flex-shrink: 0;
}

.ci-phone-number {
    flex: 1;
}

/* ── Sticky footer ────────────────────────────────────────────────────────*/

.ci-footer {
    flex-shrink: 0;
    padding: 0.875rem 1.25rem 1.25rem;
    background: #fff;
    border-top: 1px solid #f0f0f4;
}

.ci-submit-btn {
    width: 100%;
    padding: 0.95rem 1rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(
        to bottom,
        var(--page-red-top) 0%,
        var(--page-red-seam) 34%,
        var(--page-red-bottom) 100%
    );
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    cursor: pointer;
    letter-spacing: -0.01em;
    transition: opacity 0.15s, transform 0.12s;
    box-shadow: 0 4px 18px rgba(195, 2, 4, 0.28);
}

.ci-submit-btn:active {
    transform: scale(0.98);
    opacity: 0.92;
}

.ci-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

/* ── Payment section ───────────────────────────────────────────────────*/

.ci-pay-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ci-pay-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1.5px solid #e0e0eb;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s;
    user-select: none;
}

.ci-pay-option--selected,
.ci-pay-option:has(input:checked) {
    border-color: var(--page-red-seam);
    background: #f7f5ff;
}

.ci-pay-option input[type="radio"] {
    accent-color: var(--page-red-seam);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
}

.ci-payment-modal-open {
    overflow: hidden;
}

.ci-payment-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.ci-payment-modal__mount {
    width: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ci-pay-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ci-pay-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a1a2e;
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
}

.ci-pay-desc {
    font-size: 0.73rem;
    color: #888;
}

.ci-pay-amount {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--page-red-seam);
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    white-space: nowrap;
}

.ci-pay-helper {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid #ececf4;
    border-radius: 12px;
    background: linear-gradient(180deg, #fafafe 0%, #f6f7fb 100%);
}

.ci-pay-helper-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--page-red-seam);
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
}

.ci-pay-helper-body {
    font-size: 0.76rem;
    line-height: 1.5;
    color: #667085;
}

/* ── Policies checkbox ──────────────────────────────────────────────*/

.ci-policies {
    margin-top: 0.25rem;
}

.ci-policy-label {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 0;        /* checkmark replaces browser checkbox */
}

/* Hide native checkbox */
.ci-policy-check {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Custom checkmark box */
.ci-checkmark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2px solid #c0bdd6;
    border-radius: 5px;
    background: #fff;
    transition: border-color 0.15s, background 0.15s;
}

.ci-checkmark::after {
    content: "";
    display: none;
    width: 5px;
    height: 10px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

.ci-policy-check:checked ~ .ci-checkmark {
    background: var(--page-red-seam);
    border-color: var(--page-red-seam);
}

.ci-policy-check:checked ~ .ci-checkmark::after {
    display: block;
}

.ci-field--invalid .ci-checkmark {
    border-color: #e53935;
}

.ci-policy-text {
    font-size: 0.82rem;
    color: #555;
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    line-height: 1.4;
}

.ci-policy-link {
    color: var(--page-red-seam);
    text-decoration: none;
    font-weight: 600;
}

.ci-policy-link:hover,
.ci-policy-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

.ci-panel--policy-open .ci-body {
    overflow: hidden;
}

.ci-policy-modal[hidden] {
    display: none;
}

.ci-policy-modal {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.ci-policy-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(12, 18, 31, 0.56);
    padding: 0;
    cursor: pointer;
}

.ci-policy-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 68rem);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfcfe 100%);
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.24);
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.ci-policy-modal--active .ci-policy-modal-dialog {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.ci-policy-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem 1rem 0.45rem;
}

.ci-policy-modal-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ci-policy-modal-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--page-red-seam);
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
}

.ci-policy-modal-title {
    margin: 0;
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a1a2e;
}

.ci-policy-modal-subtitle {
    margin: 0;
    padding: 0 1rem 1rem;
    color: #666c7a;
    font-size: 0.82rem;
    line-height: 1.5;
}

.ci-policy-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid #e3e7ef;
    border-radius: 999px;
    background: #fff;
    color: #2d3748;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.16s ease, transform 0.16s ease, background-color 0.16s ease;
}

.ci-policy-modal-close:hover,
.ci-policy-modal-close:focus-visible {
    border-color: var(--page-red-seam);
    background: #fff5f5;
    transform: scale(1.03);
    outline: none;
}

.ci-policy-modal-layout {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    border-top: 1px solid #eef0f6;
}

.ci-policy-modal-nav {
    border-bottom: 1px solid #eef0f6;
    background: #fafafd;
}

.ci-policy-modal-nav-title {
    margin: 0;
    padding: 1rem 1rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a90a3;
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
}

.ci-policy-modal-tablist {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    padding: 0 1rem 1rem;
    scrollbar-width: thin;
}

.ci-policy-tab {
    flex: 0 0 auto;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #4a5568;
    padding: 0.7rem 0.95rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.ci-policy-tab:hover,
.ci-policy-tab:focus-visible {
    border-color: var(--page-red-seam);
    color: var(--page-red-seam);
    outline: none;
}

.ci-policy-tab.is-active {
    border-color: var(--page-red-seam);
    background: var(--page-red-seam);
    color: #fff;
    box-shadow: 0 10px 24px rgba(220, 5, 4, 0.18);
}

.ci-policy-modal-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 1rem 1.25rem;
}

.ci-policy-panel {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.ci-policy-panel[hidden] {
    display: none;
}

.ci-policy-panel-title {
    margin: 0;
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
}

.ci-policy-paragraph {
    margin: 0;
    color: #4b5563;
    font-size: 0.84rem;
    line-height: 1.62;
}

.ci-policy-table-wrap {
    overflow-x: auto;
    border: 1px solid #ececf4;
    border-radius: 16px;
    background: #fff;
}

.ci-policy-table {
    width: 100%;
    min-width: 24rem;
    border-collapse: collapse;
}

.ci-policy-table thead {
    background: #f8fafc;
}

.ci-policy-table th,
.ci-policy-table td {
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    font-size: 0.79rem;
}

.ci-policy-table tbody tr:last-child th,
.ci-policy-table tbody tr:last-child td {
    border-bottom: 0;
}

.ci-policy-table thead th {
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    font-weight: 700;
    color: #334155;
}

.ci-policy-table tbody th {
    font-weight: 700;
    color: #1f2937;
}

@media (min-width: 840px) {
    .ci-policy-modal {
        padding: 1.5rem;
    }

    .ci-policy-modal-header {
        padding: 1.35rem 1.5rem 0.6rem;
    }

    .ci-policy-modal-subtitle {
        padding: 0 1.5rem 1rem;
        font-size: 0.88rem;
    }

    .ci-policy-modal-layout {
        display: grid;
        grid-template-columns: minmax(15rem, 17.5rem) minmax(0, 1fr);
    }

    .ci-policy-modal-nav {
        border-right: 1px solid #eef0f6;
        border-bottom: none;
    }

    .ci-policy-modal-tablist {
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
        padding: 0 1rem 1.25rem;
    }

    .ci-policy-tab {
        width: 100%;
        text-align: left;
        border-radius: 16px;
    }

    .ci-policy-modal-content {
        padding: 1.35rem 1.5rem 1.5rem;
    }

    .ci-policy-panel-title {
        font-size: 1.08rem;
    }

    .ci-policy-paragraph {
        font-size: 0.88rem;
    }
}

@media (max-width: 560px) {
    .ci-policy-modal {
        padding: 0.75rem;
    }

    .ci-policy-modal-dialog {
        border-radius: 20px;
    }

    .ci-policy-modal-header {
        padding: 0.95rem 0.95rem 0.45rem;
    }

    .ci-policy-modal-subtitle {
        padding: 0 0.95rem 0.9rem;
    }

    .ci-policy-modal-title {
        font-size: 1.02rem;
    }
}

/* ── Contact box ────────────────────────────────────────────────────*/

.ci-contact-box {
    border: 1.5px solid #f0f0f4;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    background: #fafafa;
    margin-bottom: 0.5rem;
}

.ci-contact-title {
    font-family: "Montserrat", "Metropolis", "Segoe UI", sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.2rem;
}

.ci-contact-sub {
    font-size: 0.78rem;
    color: #888;
    margin: 0 0 0.5rem;
}

.ci-contact-details {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.ci-contact-phone {
    font-size: 0.82rem;
    color: #333;
    font-weight: 600;
}

.ci-contact-email {
    font-size: 0.78rem;
    color: var(--page-red-seam);
    text-decoration: none;
}

@media (min-width: 980px) {
    .ci-panel {
        display: grid;
        grid-template-columns: minmax(280px, 340px) minmax(0, 760px);
        grid-template-rows: auto auto auto;
        justify-content: center;
        align-content: start;
        column-gap: 1.5rem;
        padding: 1.5rem clamp(2rem, 4vw, 4rem) 2rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .ci-header {
        grid-column: 1 / -1;
        padding: 0 0 1rem;
        margin-bottom: 0.25rem;
        position: sticky;
        top: 0;
        z-index: 12;
    }

    .ci-body {
        display: contents;
        padding: 0;
        overflow: visible;
    }

    .ci-recap {
        grid-column: 1;
        grid-row: 2 / span 2;
        flex-direction: column;
        align-items: flex-start;
        align-self: start;
        position: sticky;
        top: 5.25rem;
        gap: 1.25rem;
        padding: 1.4rem;
        border: 1px solid #ececf4;
        border-radius: 24px;
        background: linear-gradient(180deg, #fafafe 0%, #f5f5fa 100%);
        box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
    }

    .ci-recap-img {
        width: 100%;
        max-width: 260px;
        height: 170px;
        align-self: center;
        padding: 0.85rem;
        border-radius: 18px;
        background: linear-gradient(135deg, #f7f7fb 0%, #ececf5 100%);
    }

    .ci-recap-info {
        width: 100%;
    }

    .ci-recap-name {
        font-size: 1.15rem;
        white-space: normal;
    }

    .ci-recap-extras {
        font-size: 0.88rem;
        line-height: 1.45;
    }

    .ci-recap-total {
        font-size: 0.95rem;
    }

    .ci-form {
        grid-column: 2;
        min-width: 0;
    }

    .ci-contact-box {
        padding: 1rem 1.05rem;
        border-radius: 18px;
        background: linear-gradient(180deg, #fbfbfd 0%, #f5f5fa 100%);
    }

    .ci-section-title{
        margin-top: 0.75rem;
    }

    .ci-policy-label {
        margin-top: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .ci-footer {
        grid-column: 2;
        padding: 1.15rem 0 0;
        border-top: none;
        background: transparent;
    }
}
