/* ---------- Utilidades ---------- */
.badge-soft {
    display: inline-block;
    padding: .25rem .5rem;
    border-radius: .5rem;
    background: #f3f6f9;
    color: #6b7280;
    font-weight: 600;
    font-size: .75rem;
}

.inline-note {
    background: #f8fafc;
    border: 1px dashed #d1d5db;
    color: #374151;
    padding: .5rem .75rem;
    border-radius: .5rem;
    font-size: .875rem;
}

.exam-policy-box {
    border: 1px solid #d4d4d8;
    border-left: 4px solid #0ea5e9;
    background: #f9fafb;
    padding: 1rem 1.25rem;
    border-radius: .9rem;
    color: #1f2937;
    font-size: .9rem;
}

.exam-policy-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .5rem 0;
    color: #0f172a;
}

.exam-policy-intro {
    margin: 0 0 .75rem 0;
    color: #334155;
}

.exam-policy-list {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: .85rem;
}

.exam-policy-list li {
    margin: 0;
}

.exam-policy-list strong {
    display: block;
    font-size: .95rem;
    color: #0f172a;
    margin-bottom: .35rem;
}

.exam-policy-list p {
    margin: 0 0 .5rem 0;
    line-height: 1.5;
    color: #1f2937;
}

.exam-policy-list p:last-child {
    margin-bottom: 0;
}

/* ---------- Header Openpay ---------- */
.op-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
    background: #ffffff;
}

.op-header-left {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.op-logo {
    height: 22px;
    /* tamaño compacto */
    width: auto;
    display: block;
}

.op-header-text {
    font-weight: 700;
    color: #0ea5e9;
    /* celeste tipo Openpay */
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .95rem;
}

.op-header-icons {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.op-icon {
    height: 18px;
    width: auto;
    display: block;
    opacity: .9;
}

/* ---------- Logos de tarjetas ---------- */
.brand-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.pay-brand {
    height: 35px;
    /* todos parejitos */
    width: auto;
    display: block;
    object-fit: contain;
}

/* ---------- Form tarjeta ---------- */
#tab-card .form-control::placeholder {
    color: #9ca3af;
}

#tab-card .form-control {
    border-color: #e5e7eb;
}

#tab-card .form-control:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .15);
}

/* Botones */
#tab-card .btn-primary,
#tab-store .btn-outline-primary,
#tab-bank .btn-outline-secondary {
    border-radius: .65rem;
}

/* ---------- Pestañas ---------- */
#payTabs .nav-link {
    font-weight: 600;
    color: #6b7280;
}

#payTabs .nav-link.active {
    color: #0ea5e9;
    border-color: #0ea5e9 #0ea5e9 transparent;
}

/* ---------- Recibo (modal resultado) ---------- */
.receipt-card {
    border-radius: 1rem;
    overflow: hidden;
}

/* Lista de artículos en el recibo */
.result-items {
    width: 100%;
}

.result-item {
    background: #fff;
}

.result-item .ri-title {
    font-size: .95rem;
}

.result-item .ri-meta .badge {
    font-weight: 500;
}

@media (max-width: 480px) {
    .result-item .ri-title {
        font-size: .9rem;
    }

    .result-item .ri-meta {
        gap: .35rem !important;
    }
}

.receipt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem .75rem;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    margin-bottom: .5rem;
    background: #fff;
}

.receipt-row .label {
    color: #6b7280;
    font-size: .875rem;
    margin-right: 1rem;
}

.copy-line {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.copy-line code {
    font-size: .9rem;
    padding: .15rem .35rem;
    background: #f3f4f6;
    border-radius: .35rem;
    color: #111827;
}

.copy-btn {
    border: 1px solid #e5e7eb;
}

#resultAmount {
    color: #111827;
}

/* Resaltado temporal cuando se copia */
.receipt-row.border-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 .2rem rgba(16, 185, 129, .1);
}

/* ---------- Paynet (logos tiendas) ---------- */
.store-logos img {
    height: 35px;
    width: auto;
    object-fit: contain;
    filter: saturate(.95);
}

/* ---------- Offcanvas carrito (mini mejoras) ---------- */
.cart-thumb {
    width: 62px;
    height: 62px;
    border-radius: .5rem;
    object-fit: cover;
    background: #f3f4f6;
}

.qty-input {
    width: 64px;
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .op-logo {
        height: 20px;
    }

    .op-icon {
        height: 16px;
    }

    .pay-brand {
        height: 20px;
    }

    .store-logos img {
        height: 20px;
    }
}

#checkoutAlert {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ---------- Checkout modal layout tweaks ---------- */
#checkoutModal .modal-dialog {
    margin: 1.25rem auto;
    /* centrado horizontal consistente */
}

/* Asegura que el listado de productos se envuelva y no se salga */
#checkoutModal #productTitles {
    display: block;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
}

/* En pantallas pequeñas, reduce márgenes laterales para centrar visualmente */
@media (max-width: 576px) {
    #checkoutModal .modal-dialog {
        margin: 0.75rem auto;
    }

    #checkoutModal #productTitles {
        font-size: .9rem;
    }
}

/* Chips de productos debajo del renglón "Productos:" */
#productTitlesBlock.product-chips {
    margin-top: .25rem;
}

#productTitlesBlock .chips-list {
    width: 100%;
}

#productTitlesBlock .prod-chip {
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
}

#checkoutAgendaSummary.agenda-summary {
    border-top: 1px solid #E5E7EB;
    padding-top: 12px;
}

#checkoutAgendaSummary .agenda-summary-head {
    font-size: .78rem;
    color: #6B7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.agenda-summary-item {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.agenda-summary-title {
    font-weight: 600;
    font-size: .95rem;
    color: #111827;
    margin-bottom: 8px;
}

.agenda-summary-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.agenda-summary-field {
    min-width: 120px;
}

.agenda-summary-field .agenda-label {
    display: block;
    font-size: .72rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}

.agenda-summary-field .agenda-value {
    font-weight: 600;
    font-size: .95rem;
    color: #111827;
}

/* ------- Result modal labelled chips ------- */
.result-item .ri-kv {
    width: 100%;
}

.result-item .ri-kv .kv {
    min-width: 120px;
}

.ri-kv .kv {
    min-width: 120px;
}

/* El primer bloque (Certificación) ocupa todo el ancho y envuelve */
.result-item .ri-kv .kv:first-child {
    flex: 1 1 100%;
    min-width: 0;
}

.result-item .ri-kv .kv:first-child .badge {
    display: inline-block;
    white-space: normal;
    word-break: break-word;
    max-width: 100%;
    line-height: 1.2;
}

@media (max-width: 480px) {
    .result-item .ri-kv .kv {
        min-width: 100px;
    }

    .ri-kv .kv {
        min-width: 100px;
    }
}