/* ================================================================
   Payment Plan — customer-payment-plan.css
   Components: plan cards, method cards, amount displays,
               QR payment, cash payment, store selection
   ================================================================ */

/* ── Step 1: Order Total Reference ──────────────────────────────── */
.bim-payment-plan-total {
    padding: var(--bim-space-3) var(--bim-space-4);
    margin-bottom: var(--bim-space-5);
    background: var(--bim-bg-warm-alt);
    border: 1px solid var(--bim-border);
    border-radius: var(--bim-radius-sm);
}

#bim-checkout-step-3-cash .bim-payment-plan-total {
    border-left: 3px solid var(--bim-success);
}

#bim-checkout-step-3-cash .bim-cash-saldo-row {
    border-left: 3px solid var(--bim-success);
}

.bim-plan-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.bim-plan-total-label {
    font-size: var(--bim-text-sm);
    font-weight: 700;
    color: var(--bim-text-secondary);
}

.bim-plan-total-amount-usd {
    font-size: var(--bim-text-lg);
    font-weight: 800;
    color: var(--bim-text-primary);
    font-variant-numeric: tabular-nums;
}

.bim-plan-total-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: var(--bim-text-sm);
    color: var(--bim-text-muted);
    margin-top: var(--bim-space-1);
}

.bim-plan-total-meta-left {
    word-spacing: 0.1em;
    white-space: nowrap;
}

.bim-plan-total-meta-right {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--bim-text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Product count badge — separate line below TC/Bs row */
.bim-plan-total-badge {
    font-size: var(--bim-text-xs);
    color: var(--bim-text-faint);
    margin-top: 2px;
}

/* ── Plan Cards Container ───────────────────────────────────────── */
.bim-checkout-plan-cards {
    display: flex;
    flex-direction: column;
    gap: var(--bim-space-3);
}

/* ── Plan Card ──────────────────────────────────────────────────── */
.bim-payment-plan-card {
    position: relative;
    background: var(--bim-surface);
    border: 2px solid var(--bim-border);
    border-radius: var(--bim-radius);
    cursor: pointer;
    transition: border-color var(--bim-transition-base), box-shadow var(--bim-transition-base), background var(--bim-transition-base);
    overflow: visible;
}

.bim-payment-plan-card:hover {
    border-color: var(--bim-accent);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.15), 0 0 0 2px rgba(255, 0, 0, 0.08);
}

/* Selected state */
.bim-payment-plan-card.selected {
    border-color: var(--bim-accent);
    background: var(--bim-accent-light);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.15), 0 0 0 2px rgba(255, 0, 0, 0.08);
}

/* Card header — icon + title + radio */
.bim-plan-card-header {
    display: flex;
    align-items: center;
    gap: var(--bim-space-3);
    padding: var(--bim-space-4) var(--bim-space-4) var(--bim-space-2) var(--bim-space-4);
}

/* Plan icon container — hidden in redesign (kept for method cards) */
.bim-checkout-plan-card .bim-plan-icon {
    display: none;
}

.bim-plan-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--bim-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bim-bg-warm-alt);
    border: 1px solid var(--bim-border-light);
}

.bim-plan-icon .material-symbols-outlined {
    font-size: 22px;
    color: var(--bim-text-muted);
}

.bim-payment-plan-card.selected .bim-plan-icon {
    background: var(--bim-accent-light);
    border-color: var(--bim-accent-border);
}

.bim-payment-plan-card.selected .bim-plan-icon .material-symbols-outlined {
    color: var(--bim-accent);
}

/* Header text */
.bim-plan-header-text {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--bim-space-2);
    flex-wrap: wrap;
}

.bim-plan-title {
    font-size: var(--bim-text-base) !important;
    font-weight: 700 !important;
    color: var(--bim-text-primary) !important;
    margin: 0 !important;
    text-transform: none !important;
    font-style: normal !important;
}

/* Recommended badge — inline red text */
.bim-plan-recommended-badge {
    display: inline-block;
    font-size: var(--bim-text-xs);
    font-weight: 700;
    color: var(--bim-accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    margin-bottom: var(--bim-space-1);
}

/* No extra top margin needed — badge is now inline */
.bim-plan-partial {
    margin-top: 0;
}

/* Radio indicator — right side (natural position) */
.bim-plan-radio {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bim-radio-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--bim-border);
    transition: border-color var(--bim-transition-fast), border-width var(--bim-transition-fast);
    box-sizing: border-box;
}

.bim-radio-check {
    display: none;
}

.bim-payment-plan-card.selected .bim-radio-circle {
    display: block;
    border-width: 6px;
    border-color: var(--bim-accent);
}

.bim-payment-plan-card.selected .bim-radio-check {
    display: none;
}

/* Card body — collapsible details */
.bim-plan-card-body {
    padding: 0 var(--bim-space-4) var(--bim-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--bim-space-2);
}

.bim-plan-subtitle {
    font-size: var(--bim-text-sm);
    color: var(--bim-text-muted);
    margin: 0 0 var(--bim-space-1) 0 !important;
    line-height: 1.4;
}

/* Amount display inside plan card */
.bim-plan-amount-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--bim-space-3);
    background: var(--bim-bg-input);
    border-radius: var(--bim-radius-sm);
    border: 1px solid var(--bim-border-light);
}

.bim-plan-amount-label {
    font-size: var(--bim-text-sm);
    font-weight: 600;
    color: var(--bim-text-muted);
}

.bim-plan-amount-value {
    font-size: var(--bim-text-base);
    font-weight: 800;
    color: var(--bim-text-primary);
    font-variant-numeric: tabular-nums;
}

/* Remaining balance notice */
.bim-plan-remaining-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--bim-space-2);
    padding: var(--bim-space-3);
    background: var(--bim-info-light);
    border-radius: var(--bim-radius-sm);
    font-size: var(--bim-text-sm);
    color: var(--bim-info);
}

.bim-plan-remaining-notice .material-symbols-outlined {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.bim-plan-remaining-text {
    line-height: 1.5;
}

.bim-plan-remaining-text strong {
    font-weight: 700;
}

.bim-plan-remaining-text small {
    font-size: var(--bim-text-xs);
    color: var(--bim-text-muted);
}

/* Benefits list */
.bim-plan-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--bim-space-2);
}

.bim-plan-benefits li {
    display: flex;
    align-items: flex-start;
    gap: var(--bim-space-2);
    font-size: var(--bim-text-sm);
    color: var(--bim-text-secondary);
    line-height: 1.4;
}

.bim-plan-benefits li .material-symbols-outlined {
    font-size: 16px;
    color: var(--bim-success);
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Payment Timeline (Partial Plan) ───────────────────────────── */
.bim-plan-timeline {
    display: flex;
    align-items: center;
    gap: 0;
    padding: var(--bim-space-3) 0;
}

.bim-plan-timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--bim-space-2);
    flex: 1;
    text-align: center;
}

.bim-plan-timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bim-border);
    background: var(--bim-surface);
    flex-shrink: 0;
}

.bim-plan-timeline-icon .material-symbols-outlined {
    font-size: 20px;
    color: var(--bim-text-muted);
}

/* Active timeline step */
.bim-plan-timeline-step.bim-timeline-active .bim-plan-timeline-icon {
    border-color: var(--bim-accent);
    background: var(--bim-accent-light);
}

.bim-plan-timeline-step.bim-timeline-active .bim-plan-timeline-icon .material-symbols-outlined {
    color: var(--bim-accent);
}

.bim-plan-timeline-label {
    font-size: var(--bim-text-2xs);
    font-weight: 700;
    color: var(--bim-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bim-plan-timeline-step.bim-timeline-active .bim-plan-timeline-label {
    color: var(--bim-accent);
}

.bim-plan-timeline-amount {
    font-size: var(--bim-text-sm);
    font-weight: 800;
    color: var(--bim-text-primary);
    font-variant-numeric: tabular-nums;
}

/* Timeline connector */
.bim-plan-timeline-connector {
    flex: 0 0 auto;
    width: 40px;
    height: 2px;
    background: var(--bim-border);
    align-self: flex-start;
    margin-top: 20px; /* half of 40px icon */
}

/* ── Horizontal Price Row (Full Plan) ──────────────────────────── */
.bim-plan-amount-display.bim-plan-amount-horizontal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--bim-space-3);
    background: var(--bim-bg-input);
    border-radius: var(--bim-radius-sm);
    border: 1px solid var(--bim-border-light);
}

/* ── Info Box (Negotiate Card) ─────────────────────────────────── */
.bim-plan-info-box {
    display: flex;
    align-items: flex-start;
    gap: var(--bim-space-2);
    padding: var(--bim-space-3);
    background: var(--bim-info-light);
    border-radius: var(--bim-radius-sm);
    font-size: var(--bim-text-xs);
    color: var(--bim-info);
    line-height: 1.5;
}

.bim-plan-info-box .material-symbols-outlined {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Step 2: Store preview in Cash method card ──────────────────── */
.bim-method-store-preview {
    list-style: none;
    margin: var(--bim-space-2) 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bim-method-store-preview li {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--bim-text-xs);
    color: var(--bim-text-muted);
}

.bim-method-store-preview li .material-symbols-outlined {
    font-size: 13px;
    color: var(--bim-text-faint);
    flex-shrink: 0;
}

.bim-method-store-preview .bim-preview-city {
    color: var(--bim-text-faint);
}

/* ── Step 2: Method Selection ───────────────────────────────────── */
.bim-payment-method-amount {
    text-align: center;
    padding: var(--bim-space-4);
    background: var(--bim-bg-warm);
    border: 1px solid var(--bim-border-light);
    border-radius: var(--bim-radius-sm);
    margin-bottom: var(--bim-space-5);
}

.bim-payment-method-amount-label {
    font-size: var(--bim-text-sm);
    font-weight: 600;
    color: var(--bim-text-muted);
    margin-bottom: var(--bim-space-1);
}

.bim-payment-method-amount-value {
    font-size: var(--bim-text-xl);
    font-weight: 800;
    color: var(--bim-text-primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* Method options container */
.bim-checkout-method-options {
    display: flex;
    flex-direction: column;
    gap: var(--bim-space-3);
}

/* Method option — label wraps hidden radio + visible card */
.bim-method-option {
    display: block;
    cursor: pointer;
}

.bim-method-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Method card */
.bim-method-option-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--bim-space-4);
    background: var(--bim-surface);
    border: 2px solid var(--bim-border);
    border-radius: var(--bim-radius);
    transition: border-color var(--bim-transition-base), box-shadow var(--bim-transition-base);
}

.bim-method-option-card:hover {
    border-color: var(--bim-text-faint);
}

/* Selected method */
.bim-method-option input:checked + .bim-method-option-card {
    border-color: var(--bim-accent);
    background: var(--bim-accent-light);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

/* Method card in checkout — pink tint on selected */
.bim-checkout-method-card.selected {
    background: var(--bim-accent-light);
}

.bim-method-option-left {
    display: flex;
    align-items: center;
    gap: var(--bim-space-3);
}

/* Method icon */
.bim-method-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--bim-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bim-method-icon .material-symbols-outlined {
    font-size: 24px;
}

.bim-method-icon-qr {
    background: rgba(99, 102, 241, 0.08);
    color: var(--bim-info);
}

.bim-method-icon-qr .material-symbols-outlined {
    color: var(--bim-info);
}

.bim-method-icon-cash {
    background: rgba(22, 163, 74, 0.08);
}

.bim-method-icon-cash .material-symbols-outlined {
    color: var(--bim-success);
}

/* Method text */
.bim-method-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bim-method-name {
    font-size: var(--bim-text-base);
    font-weight: 700;
    color: var(--bim-text-primary);
}

.bim-method-desc {
    font-size: var(--bim-text-sm);
    color: var(--bim-text-muted);
}

/* Method check icon — hidden until selected */
.bim-method-check {
    flex-shrink: 0;
}

.bim-method-check .material-symbols-outlined {
    font-size: 24px;
    color: var(--bim-border);
    transition: color var(--bim-transition-fast);
}

.bim-method-option input:checked + .bim-method-option-card .bim-method-check .material-symbols-outlined {
    color: var(--bim-accent);
}

/* ── Step 3-QR: QR Payment ──────────────────────────────────────── */
.bim-checkout-qr-container {
    display: flex;
    flex-direction: column;
    gap: var(--bim-space-5);
}

/* QR code section */
.bim-qr-code-section {
    text-align: center;
}

.bim-qr-code-wrapper {
    display: inline-block;
    padding: var(--bim-space-3);
    background: var(--bim-surface);
    border: 2px solid var(--bim-border);
    border-radius: var(--bim-radius);
    margin-bottom: var(--bim-space-3);
    box-shadow: var(--bim-shadow-sm);
}

.bim-qr-code-image {
    display: block;
    width: 280px;
    height: 280px;
    object-fit: contain;
}

.bim-qr-placeholder {
    width: 280px;
    height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--bim-space-2);
    color: var(--bim-text-faint);
}

.bim-qr-placeholder-icon {
    font-size: 40px;
}

.bim-qr-placeholder-text {
    font-size: var(--bim-text-sm);
    margin: 0;
}

.bim-qr-instruction {
    font-size: var(--bim-text-sm);
    color: var(--bim-text-muted);
    margin: 0;
}

.bim-qr-substep-content a.bim-qr-download-btn,
.bim-qr-code-section a.bim-qr-download-btn,
a.bim-qr-download-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    max-width: 280px;
    margin: var(--bim-space-3) auto 0;
    padding: 13px 24px;
    background: #ffffff !important;
    color: #374151 !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1;
    text-decoration: none !important;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.bim-qr-substep-content a.bim-qr-download-btn:hover,
.bim-qr-code-section a.bim-qr-download-btn:hover,
a.bim-qr-download-btn:hover {
    background: #f0f7ff !important;
    border-color: var(--bim-primary) !important;
    color: var(--bim-primary) !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.15);
}

.bim-qr-substep-content a.bim-qr-download-btn:visited,
.bim-qr-code-section a.bim-qr-download-btn:visited,
a.bim-qr-download-btn:visited {
    color: #374151 !important;
    text-decoration: none !important;
}

a.bim-qr-download-btn .material-symbols-outlined {
    font-size: 20px;
    line-height: 1;
}

/* Bank details */
.bim-bank-details {
    background: var(--bim-bg-input);
    border: 1px solid var(--bim-border-light);
    border-radius: var(--bim-radius-sm);
    overflow: hidden;
}

.bim-bank-details h4 {
    font-size: var(--bim-text-sm) !important;
    font-weight: 700 !important;
    color: var(--bim-text-secondary) !important;
    margin: 0 !important;
    padding: var(--bim-space-3) var(--bim-space-4);
    border-bottom: 1px solid var(--bim-border-light);
    text-transform: none !important;
    font-style: normal !important;
}

.bim-bank-info {
    padding: var(--bim-space-3) var(--bim-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--bim-space-2);
}

.bim-bank-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--bim-space-3);
}

.bim-bank-label {
    font-size: var(--bim-text-sm);
    font-weight: 500;
    color: var(--bim-text-muted);
    flex-shrink: 0;
}

.bim-bank-value {
    font-size: var(--bim-text-sm);
    font-weight: 700;
    color: var(--bim-text-primary);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Receipt upload section */
.bim-receipt-upload h4 {
    font-size: var(--bim-text-sm) !important;
    font-weight: 700 !important;
    color: var(--bim-text-secondary) !important;
    margin: 0 0 var(--bim-space-2) !important;
    text-transform: none !important;
    font-style: normal !important;
}

/* File upload — large variant for checkout */
.bim-file-upload-lg {
    position: relative;
}

.bim-file-upload-lg .bim-file-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.bim-file-label-lg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--bim-space-2);
    padding: var(--bim-space-6) var(--bim-space-4);
    border: 2px dashed var(--bim-border);
    border-radius: var(--bim-radius-lg);
    background: var(--bim-bg-input);
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    min-height: 200px;
}

.bim-file-label-lg:hover {
    border-color: var(--bim-accent);
    background: #fff8f8;
}

/* Drag-over state (toggled by JS) */
.bim-file-label-lg.bim-drop-active {
    border-style: solid;
    border-color: var(--bim-accent);
    background: #fff0f0;
    transform: scale(1.01);
}

/* Icon wrapper */
.bim-upload-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #fff0f0;
    margin-bottom: var(--bim-space-1);
    transition: transform 0.2s ease;
}

.bim-file-label-lg:hover .bim-upload-icon-wrap,
.bim-file-label-lg.bim-drop-active .bim-upload-icon-wrap {
    transform: translateY(-3px);
}

.bim-upload-icon {
    font-size: 28px;
    color: var(--bim-accent);
}

/* Text hierarchy */
.bim-file-text {
    font-size: var(--bim-text-base);
    font-weight: 600;
    color: var(--bim-text-primary);
}

.bim-file-subtext {
    font-size: var(--bim-text-sm);
    color: var(--bim-text-muted);
    margin-top: -4px;
}

/* "Seleccionar archivo" pill button inside the label */
.bim-file-choose-btn {
    display: inline-block;
    padding: 6px 18px;
    border: 1.5px solid var(--bim-accent);
    border-radius: 999px;
    font-size: var(--bim-text-sm);
    font-weight: 600;
    color: var(--bim-accent);
    background: transparent;
    margin-top: var(--bim-space-1);
    transition: background 0.15s ease, color 0.15s ease;
}

.bim-file-label-lg:hover .bim-file-choose-btn {
    background: var(--bim-accent);
    color: #fff;
}

/* Format + size hint */
.bim-file-hint {
    font-size: 11px;
    color: var(--bim-text-muted);
    letter-spacing: 0.02em;
    margin-top: var(--bim-space-1);
}

/* Paste hint */
.bim-file-paste-hint {
    font-size: 11px;
    color: var(--bim-text-muted);
    opacity: 0.75;
}

/* File preview card (injected by JS) */
.bim-file-preview-card {
    display: flex;
    align-items: center;
    gap: var(--bim-space-3);
    padding: var(--bim-space-3);
    background: var(--bim-surface);
    border: 1px solid var(--bim-border);
    border-radius: var(--bim-radius-sm);
    margin-top: var(--bim-space-3);
}

.bim-preview-thumb-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--bim-radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--bim-border-light);
}

.bim-preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bim-preview-info {
    flex: 1;
    min-width: 0;
}

.bim-preview-filename {
    font-size: var(--bim-text-sm);
    font-weight: 600;
    color: var(--bim-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bim-preview-filesize {
    font-size: var(--bim-text-xs);
    color: var(--bim-text-muted);
}

.bim-preview-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--bim-danger-light);
    color: var(--bim-danger);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: background var(--bim-transition-fast);
}

.bim-preview-remove:hover {
    background: var(--bim-danger) !important;
    color: var(--bim-surface);
}

/* File error */
.bim-file-error {
    font-size: var(--bim-text-sm);
    font-weight: 600;
    color: var(--bim-danger);
    padding: var(--bim-space-2) 0;
}

/* ── Step 3-Cash: Cash Payment ──────────────────────────────────── */
.bim-checkout-cash-container {
    display: flex;
    flex-direction: column;
    gap: var(--bim-space-5);
}

/* Cash saldo card (partial plan) — matches Step 2 summary layout */
.bim-cash-saldo-card {
    display: flex;
    flex-direction: column;
    gap: var(--bim-space-3);
    margin-bottom: var(--bim-space-5);
}

.bim-cash-saldo-divider {
    display: none;
}

/* Non-muted row — matches .bim-payment-plan-total */
.bim-cash-saldo-row {
    display: flex;
    flex-direction: column;
    gap: var(--bim-space-1);
    padding: var(--bim-space-3) var(--bim-space-4);
    background: var(--bim-bg-warm-alt);
    border: 1px solid var(--bim-border);
    border-radius: var(--bim-radius-sm);
}

.bim-cash-saldo-amounts {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--bim-space-3);
}

/* matches .bim-plan-total-label */
.bim-cash-saldo-label {
    font-size: var(--bim-text-sm);
    font-weight: 700;
    color: var(--bim-text-secondary);
    line-height: 1.4;
}

/* matches .bim-plan-total-amount-usd */
.bim-cash-saldo-usd {
    font-size: var(--bim-text-lg);
    font-weight: 800;
    color: var(--bim-text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* matches .bim-plan-total-meta */
.bim-cash-saldo-meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: var(--bim-text-sm);
    color: var(--bim-text-muted);
    margin-top: var(--bim-space-1);
}

/* matches .bim-plan-total-meta-left */
.bim-cash-saldo-tc {
    font-size: var(--bim-text-sm);
    color: var(--bim-text-muted);
    word-spacing: 0.1em;
}

/* matches .bim-plan-total-meta-right */
.bim-cash-saldo-bob {
    font-size: var(--bim-text-sm);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--bim-text-secondary);
}

/* Muted row uses .bim-saldo-strip classes — see customer-checkout-stepper.css */

/* Form group (notes textarea) */
.bim-checkout-cash-container .bim-form-group label {
    display: block;
    font-size: var(--bim-text-sm);
    font-weight: 600;
    color: var(--bim-text-secondary);
    margin-bottom: var(--bim-space-2);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .bim-plan-card-header {
        padding: var(--bim-space-3);
    }

    .bim-plan-card-body {
        padding: 0 var(--bim-space-3) var(--bim-space-3);
    }

    .bim-plan-icon {
        width: 36px;
        height: 36px;
    }

    .bim-plan-icon .material-symbols-outlined {
        font-size: 20px;
    }

    .bim-method-option-card {
        padding: var(--bim-space-3);
    }

    .bim-method-icon {
        width: 40px;
        height: 40px;
    }

    .bim-method-icon .material-symbols-outlined {
        font-size: 22px;
    }

    .bim-plan-timeline-connector {
        width: 24px;
    }

    .bim-plan-timeline-icon {
        width: 36px;
        height: 36px;
    }

    .bim-plan-timeline-icon .material-symbols-outlined {
        font-size: 18px;
    }

    .bim-plan-timeline-connector {
        margin-top: 18px;
    }

    /* Payment plan total — tighter padding */
    .bim-payment-plan-total {
        padding: var(--bim-space-3);
        margin-bottom: var(--bim-space-4);
    }

    /* File upload — compact on mobile */
    .bim-file-label-lg {
        min-height: 120px;
        padding: var(--bim-space-3);
        gap: var(--bim-space-1);
    }

    /* Upload icon — smaller */
    .bim-upload-icon-wrap {
        width: 44px;
        height: 44px;
        margin-bottom: 0;
    }

    .bim-upload-icon {
        font-size: 22px;
    }

    /* QR code image — override from stepper (already set there, but keep specificity) */
    .bim-qr-code-image {
        width: 150px;
        height: 150px;
    }

    .bim-qr-placeholder {
        width: 150px;
        height: 150px;
    }

    /* ── Mobile Visual Presence Fix ─────────────────────────────── */
    /* Plan cards — shadow for elevation on warm bg */
    .bim-payment-plan-card {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
    }

    /* "Monto Total" box — white so it doesn't blend into warm panel bg */
    .bim-payment-plan-total {
        background: var(--bim-surface);
    }

    /* Method cards — same shadow treatment */
    .bim-method-option-card {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);
    }

}

/* ── Negotiate card — dashed border by default, full effect on hover/selected ── */
.bim-payment-plan-card.bim-plan-negotiate {
    border-style: dashed;
}

.bim-payment-plan-card.bim-plan-negotiate:hover {
    border-color: var(--bim-accent);
    border-style: solid;
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.15), 0 0 0 2px rgba(255, 0, 0, 0.08);
}

.bim-payment-plan-card.bim-plan-negotiate.selected {
    border-style: solid;
    border-color: var(--bim-accent);
    box-shadow: 0 0 12px rgba(255, 0, 0, 0.15), 0 0 0 2px rgba(255, 0, 0, 0.08);
}

/* ================================================================
   Payment History Section — Full-width below quote grid
   ================================================================ */

/* ── Section wrapper ────────────────────────────────────────────── */
.bim-payment-history-section {
    margin-top: var(--bim-space-6);
    background: var(--bim-bg-light);
    border: 1px solid var(--bim-border);
    border-radius: var(--bim-radius-lg);
    box-shadow: var(--bim-shadow-sm);
    overflow: hidden;
}

/* ── Section header ─────────────────────────────────────────────── */
.bim-payment-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--bim-space-4) var(--bim-space-5);
    border-bottom: 1px solid var(--bim-border-light);
    background: var(--bim-bg-input);
}

.bim-payment-history-title {
    display: flex;
    align-items: center;
    gap: var(--bim-space-2);
    font-size: var(--bim-text-base);
    font-weight: 700;
    color: var(--bim-text-primary);
    margin: 0;
}

.bim-payment-history-title .material-symbols-outlined {
    font-size: 18px;
    color: var(--bim-text-secondary);
}

.bim-payment-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--bim-text-primary);
    color: #fff;
    font-size: var(--bim-text-xs);
    font-weight: 700;
    border-radius: 99px;
}

/* ── Payment list ───────────────────────────────────────────────── */
.bim-payment-history-list {
    padding: var(--bim-space-4) var(--bim-space-5);
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: var(--bim-space-4);
}

/* ── Payment item — clean white card ────────────────────────────── */
.bim-phi {
    background: var(--bim-surface);
    border: 1px solid var(--bim-border);
    border-radius: var(--bim-radius-lg);
    padding: var(--bim-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--bim-space-3);
    box-shadow: var(--bim-shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.bim-phi:hover {
    box-shadow: var(--bim-shadow);
    transform: translateY(-1px);
}

/* ── Status-tinted card backgrounds ─────────────────────────────── */
.bim-phi.bim-payment-status-pending {
    background: linear-gradient(160deg, #fffbeb 0%, var(--bim-surface) 55%);
    border-color: var(--bim-warning-border);
}

/* ── Top row: tipo de pago + status badge ───────────────────────── */
.bim-phi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bim-space-2);
}

.bim-phi-type-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--bim-text-sm);
    font-weight: 700;
    color: var(--bim-text-primary);
    line-height: 1.3;
}

.bim-phi-type-label .material-symbols-outlined {
    font-size: 15px;
    color: var(--bim-text-secondary);
}

/* ── Middle row: método de pago + ver comprobante ───────────────── */
.bim-phi-mid {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--bim-space-2);
    border-top: 1px solid var(--bim-border-light);
    padding-top: var(--bim-space-3);
}

/* ── Status badge ───────────────────────────────────────────────── */
.bim-payment-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px var(--bim-space-2);
    border-radius: 99px;
    font-size: var(--bim-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bim-payment-status-badge.bim-payment-status-verified {
    background: var(--bim-success-light);
    color: var(--bim-success);
}

.bim-payment-status-badge.bim-payment-status-pending {
    background: var(--bim-warning-light);
    color: var(--bim-warning-dark);
}

.bim-payment-status-badge.bim-payment-status-rejected {
    background: var(--bim-danger-light);
    color: var(--bim-danger);
}

/* ── Data grid — hairline top separator, no nested box ──────────── */
.bim-phi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--bim-space-3) var(--bim-space-4);
    background: transparent;
    border: none;
    border-top: 1px solid var(--bim-border-light);
    border-radius: 0;
    padding: var(--bim-space-3) 0 0 0;
}

.bim-phi-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bim-phi-cell--right {
    align-items: flex-end;
    text-align: right;
}

.bim-phi-label {
    font-size: var(--bim-text-xs);
    font-weight: 500;
    color: var(--bim-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bim-phi-value {
    font-size: var(--bim-text-lg);
    font-weight: 800;
    color: var(--bim-text-primary);
    font-variant-numeric: tabular-nums;
}

.bim-phi-sub {
    font-size: var(--bim-text-sm);
    font-weight: 400;
    color: var(--bim-text-muted);
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

/* ── Receipt link ───────────────────────────────────────────────── */
.bim-payment-receipt-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--bim-text-sm);
    font-weight: 600;
    color: var(--bim-info);
    text-decoration: none;
    width: fit-content;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.bim-payment-receipt-link:hover { text-decoration: underline; color: var(--bim-info); }

.bim-payment-receipt-link .material-symbols-outlined {
    font-size: 13px;
}

/* ── Receipt lightbox ───────────────────────────────────────────── */
.bim-receipt-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bim-receipt-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.bim-receipt-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bim-receipt-lightbox-close {
    position: absolute;
    top: -40px;
    right: -8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.bim-receipt-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bim-receipt-lightbox-close .material-symbols-outlined {
    font-size: 18px;
}

.bim-receipt-lightbox-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bim-receipt-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--bim-radius);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    display: block;
}

/* ── Saldo Pendiente — subtle gradient, indigo typography ───────── */
.bim-phi.bim-phi-balance {
    background: linear-gradient(145deg, #f5f6ff 0%, var(--bim-surface) 60%);
    border-color: rgba(99, 102, 241, 0.15);
}

.bim-phi.bim-phi-balance .bim-phi-grid {
    background: transparent;
    border-color: rgba(99, 102, 241, 0.12);
}

.bim-phi.bim-phi-balance .bim-phi-value {
    color: var(--bim-text-muted);
}

.bim-phi-balance-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bim-info);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bim-phi-balance-icon .material-symbols-outlined {
    font-size: 15px;
    color: #fff;
}

.bim-phi-balance-badge {
    font-size: var(--bim-text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bim-info);
    background: rgba(99, 102, 241, 0.12);
    padding: 3px var(--bim-space-2);
    border-radius: 99px;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .bim-payment-history-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .bim-payment-history-header,
    .bim-payment-history-list {
        padding-left: var(--bim-space-4);
        padding-right: var(--bim-space-4);
    }

    .bim-phi-grid {
        grid-template-columns: 1fr;
    }
}



/* ================================================================
   Summary Card — Payment Breakdown State
   Replaces the total-bob-box when payments have been made
   ================================================================ */

/* Same visual treatment as bim-summary-total-bob-box */
.bim-summary-payment-breakdown {
    background-color: var(--bim-info-light);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-bottom: 4px solid var(--bim-info);
    border-radius: var(--bim-radius-lg);
    margin-bottom: var(--bim-space-6);
    margin-left: var(--bim-space-5);
    margin-right: var(--bim-space-5);
    padding: var(--bim-space-5) var(--bim-space-4) var(--bim-space-4);
    display: flex;
    flex-direction: column;
    gap: var(--bim-space-2);
    position: relative;
    overflow: hidden;
}

.bim-summary-payment-breakdown::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4rem;
    height: 4rem;
    background-color: rgba(99, 102, 241, 0.08);
    margin-right: -2rem;
    margin-top: -2rem;
    border-radius: 50%;
}

/* ── Shared row layout ──────────────────────────────────────────── */
.bim-summary-pb-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--bim-space-3);
    position: relative;
    z-index: 1;
}

.bim-summary-pb-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: var(--bim-text-base);
    color: var(--bim-text-muted);
    font-weight: 600;
}

.bim-summary-pb-label .material-symbols-outlined {
    font-size: 16px;
}

/* ── Paid row ───────────────────────────────────────────────────── */
.bim-summary-pb-paid .bim-summary-pb-label {
    color: var(--bim-success);
    font-weight: 700;
}

.bim-summary-pb-paid .bim-summary-pb-label .material-symbols-outlined {
    color: var(--bim-success);
}

/* ── Divider ────────────────────────────────────────────────────── */
.bim-summary-pb-divider {
    height: 1px;
    background: rgba(99, 102, 241, 0.2);
    margin: var(--bim-space-2) 0 var(--bim-space-1);
    position: relative;
    z-index: 1;
}

/* ── Stacked USD + Bs. amounts (ref rows) ───────────────────────── */
.bim-summary-pb-amount-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--bim-space-1);
}

.bim-summary-pb-usd {
    font-size: var(--bim-text-lg);
    font-weight: 800;
    color: var(--bim-text-primary);
    font-variant-numeric: tabular-nums;
}

/* Paid row: green USD */
.bim-summary-pb-paid-amount {
    color: var(--bim-success) !important;
}

.bim-summary-pb-bob {
    font-size: var(--bim-text-sm);
    font-weight: 600;
    color: var(--bim-text-muted);
    font-variant-numeric: tabular-nums;
}

/* ── Remaining balance — hero section (mirrors total-bob-box style) */
.bim-summary-pb-remaining {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--bim-space-1);
    padding-top: var(--bim-space-3);
    position: relative;
    z-index: 1;
}

.bim-summary-pb-remaining-label {
    font-size: var(--bim-text-sm);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-style: italic;
    color: var(--bim-text-secondary);
    display: block;
}

.bim-summary-pb-remaining-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--bim-space-2);
}

.bim-summary-pb-remaining-usd {
    font-size: var(--bim-text-3xl);
    font-weight: 900;
    color: var(--bim-text-primary);
    letter-spacing: -0.05em;
    font-variant-numeric: tabular-nums;
    display: block;
}

.bim-summary-pb-remaining-bob {
    font-size: var(--bim-text-base);
    font-weight: 600;
    color: var(--bim-text-secondary);
    font-variant-numeric: tabular-nums;
    display: block;
}

/* ================================================================
   Negotiation Thread (Customer Side)
   ================================================================ */

.bim-negotiation-thread-customer {
    background: var(--bim-surface);
    border: 1px solid var(--bim-border);
    border-radius: var(--bim-radius-lg);
    padding: var(--bim-space-5);
}

.bim-negotiation-thread-customer .bim-thread-label {
    display: flex;
    align-items: center;
    gap: var(--bim-space-2);
    font-size: var(--bim-text-sm);
    font-weight: 600;
    color: var(--bim-text-muted);
    margin-bottom: var(--bim-space-4);
}

.bim-negotiation-thread-customer .bim-thread-label .material-symbols-outlined {
    font-size: 1.125rem;
}

.bim-negotiation-thread-customer .bim-thread-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 4px;
    margin-bottom: var(--bim-space-4);
}

/* Customer-side chat bubbles */
.bim-negotiation-thread-customer .bim-negotiation-bubble {
    padding: 12px 16px;
    border-radius: 14px;
    max-width: 85%;
    font-size: var(--bim-text-sm);
    line-height: 1.5;
}

.bim-negotiation-thread-customer .bim-bubble-customer {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    align-self: flex-end;
}

.bim-negotiation-thread-customer .bim-bubble-customer .bim-bubble-header strong {
    color: var(--bim-text-primary);
    font-size: 12px;
}

.bim-negotiation-thread-customer .bim-bubble-admin {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    align-self: flex-start;
}

.bim-negotiation-thread-customer .bim-bubble-admin .bim-bubble-header strong {
    color: #1e40af;
    font-size: 12px;
}

.bim-negotiation-thread-customer .bim-negotiation-bubble .bim-bubble-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.bim-negotiation-thread-customer .bim-negotiation-bubble .bim-bubble-header time {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.bim-negotiation-thread-customer .bim-negotiation-bubble .bim-bubble-text {
    margin: 0;
    color: var(--bim-text-primary);
    word-wrap: break-word;
}

/* Amount badge */
.bim-negotiation-thread-customer .bim-bubble-amount {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--bim-text-primary);
}

.bim-negotiation-thread-customer .bim-bubble-amount .material-symbols-outlined {
    font-size: 16px;
    color: #64748b;
}

/* Decision badges */
.bim-negotiation-thread-customer .bim-bubble-decision {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.bim-negotiation-thread-customer .bim-decision-approve {
    background: #d1fae5;
    color: #065f46;
}

.bim-negotiation-thread-customer .bim-decision-reject {
    background: #fee2e2;
    color: #991b1b;
}

/* Counter-Proposal Form */
.bim-counter-proposal-form {
    border-top: 1px solid var(--bim-border-light);
    padding-top: var(--bim-space-4);
}

.bim-counter-proposal-form .bim-form-group {
    margin-bottom: var(--bim-space-3);
}

.bim-counter-proposal-form .bim-form-label {
    display: block;
    font-size: var(--bim-text-sm);
    font-weight: 600;
    color: var(--bim-text-primary);
    margin-bottom: var(--bim-space-2);
}

/* Waiting badge */
.bim-negotiation-thread-customer .bim-negotiation-pending-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: #fffbeb;
    border-radius: var(--bim-radius-md);
    font-size: var(--bim-text-sm);
    font-weight: 500;
    color: #92400e;
}

/* ── Discount Strikethrough ────────────────────────────────────── */
.bim-price-original {
    text-decoration: line-through;
    color: var(--bim-text-faint) !important;
    font-size: var(--bim-text-sm);
    font-weight: 500;
    opacity: 0.7;
}

.bim-price-discounted {
    color: var(--bim-success);
    font-weight: 700;
}
