/**
 * Estilos aislados para el Frontend de Saldo Cairev + Mi Tandita Cairev
 * Compatible con Divi 5, Safari, iOS, Chrome y navegación móvil
 */

.ctcv {
    --ctcv-font-title: inherit;
    --ctcv-font-body: inherit;
    --ctcv-color-primary: #1a1a1a;
    --ctcv-color-success: #2e7d32;
    --ctcv-color-warning: #f57c00;
    --ctcv-color-danger: #c62828;
    --ctcv-color-bg-light: #f8f9fa;
    --ctcv-color-border: #e2e8f0;
    --ctcv-color-text: #2d3748;

    font-family: inherit;
    color: var(--ctcv-color-text);
    font-size: 16px;
    line-height: 1.5;
    box-sizing: border-box;
}

.ctcv *,
.ctcv *::before,
.ctcv *::after {
    box-sizing: inherit;
}

/* Tipografías normativas */
.ctcv .ctcv-title,
.ctcv h1, .ctcv h2, .ctcv h3, .ctcv h4 {
    font-family: var(--ctcv-font-title);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0;
    color: var(--ctcv-color-primary);
}

.ctcv .ctcv-title { font-size: 26px; }
.ctcv .ctcv-subtitle { font-size: 15px; color: #718096; margin-top: -8px; margin-bottom: 20px; }

/* Botones con objetivo táctil accesible (mínimo 44px) */
.ctcv .ctcv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 10px 20px;
    font-family: var(--ctcv-font-title);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.ctcv .ctcv-btn:focus-visible {
    outline: 3px solid #3182ce;
    outline-offset: 2px;
}

.ctcv .ctcv-btn-primary {
    background-color: var(--ctcv-color-primary);
    color: #ffffff;
}
.ctcv .ctcv-btn-primary:hover { background-color: #333333; color: #ffffff; }

.ctcv .ctcv-btn-success {
    background-color: var(--ctcv-color-success);
    color: #ffffff;
}
.ctcv .ctcv-btn-success:hover { background-color: #1b5e20; color: #ffffff; }

.ctcv .ctcv-btn-outline {
    background-color: transparent;
    border-color: var(--ctcv-color-primary);
    color: var(--ctcv-color-primary);
}
.ctcv .ctcv-btn-outline:hover { background-color: #f1f1f1; }

.ctcv .ctcv-btn-danger-outline {
    background-color: transparent;
    border-color: var(--ctcv-color-danger);
    color: var(--ctcv-color-danger);
}
.ctcv .ctcv-btn-danger-outline:hover { background-color: #ffebee; }

.ctcv .ctcv-btn-large {
    width: 100%;
    padding: 14px 24px;
    font-size: 18px;
}

/* Tarjetas y Contenedores */
.ctcv-saldo-card,
.ctcv-historial-card,
.ctcv-create-tandita-card,
.ctcv-aportacion-card,
.ctcv-tandita-detail,
.ctcv-selector-box,
.ctcv-progreso-widget {
    background: #ffffff;
    border: 1px solid var(--ctcv-color-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ctcv-amount-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 16px 0;
}

.ctcv-amount-item {
    display: flex;
    flex-direction: column;
}

.ctcv-label { font-size: 13px; color: #718096; text-transform: uppercase; font-weight: 600; }
.ctcv-value { font-size: 20px; font-weight: 700; color: var(--ctcv-color-primary); }
.ctcv-value-large { font-size: 32px; }

/* Grid de Tanditas */
.ctcv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ctcv-tandita-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ctcv-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ctcv-card-title {
    font-size: 20px;
    margin: 0;
}

.ctcv-reference-code {
    font-size: 13px;
    margin-bottom: 12px;
}

.ctcv-progress-bar-container {
    background-color: #edf2f7;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
    margin: 8px 0;
}

.ctcv-progress-bar {
    background-color: var(--ctcv-color-success);
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.ctcv-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #4a5568;
}

.ctcv-detail-summary {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--ctcv-color-border);
    font-size: 14px;
    line-height: 1.6;
}

.ctcv-card-footer {
    margin-top: 20px;
}

.ctcv-card-footer .ctcv-btn {
    width: 100%;
}

/* Badges de Estado */
.ctcv-badge,
.ctcv-status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
}

.ctcv-status-active { background: #e2e8f0; color: #2d3748; }
.ctcv-status-goal_reached,
.ctcv-badge-success { background: #def7ec; color: #03543f; }
.ctcv-badge-warning { background: #feecdc; color: #8a2c0d; }
.ctcv-badge-info { background: #e1effe; color: #1e429f; }
.ctcv-badge-danger { background: #fde8e8; color: #9b1c1c; }

/* Formularios */
.ctcv-form-group {
    margin-bottom: 18px;
}

.ctcv-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.ctcv-col-6 {
    flex: 1 1 calc(50% - 8px);
    min-width: 240px;
}

.ctcv-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ctcv-color-primary);
}

.ctcv-input,
.ctcv-select,
.ctcv-textarea,
.ctcv-file-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
    background-color: #ffffff;
}

.ctcv-input:focus,
.ctcv-select:focus,
.ctcv-textarea:focus {
    border-color: #3182ce;
    outline: 2px solid rgba(49, 130, 206, 0.3);
}

.ctcv-help-text {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
    display: block;
}

.ctcv-terms-box {
    background: #f7fafc;
    padding: 14px;
    border-radius: 4px;
    border: 1px solid var(--ctcv-color-border);
}

.ctcv-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px !important;
    font-weight: normal !important;
    cursor: pointer;
}

.ctcv-checkbox-label input {
    margin-top: 3px;
    width: 20px;
    height: 20px;
}

/* Tablas Responsivas */
.ctcv-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ctcv-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 14px;
}

.ctcv-table th,
.ctcv-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--ctcv-color-border);
}

.ctcv-table th {
    background: #f7fafc;
    font-family: var(--ctcv-font-title);
    font-size: 15px;
    text-transform: uppercase;
}

.ctcv-row-completed {
    background-color: #f0fdf4;
}

/* Alertas */
.ctcv-alert {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 18px;
    font-size: 14px;
}

.ctcv-alert-danger { background: #fde8e8; color: #9b1c1c; border-left: 4px solid #c62828; }
.ctcv-alert-success { background: #def7ec; color: #03543f; border-left: 4px solid #2e7d32; }
.ctcv-alert-warning { background: #feecdc; color: #8a2c0d; border-left: 4px solid #f57c00; }

.ctcv-bank-details-box {
    background: #f7fafc;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    padding: 18px;
    margin-bottom: 24px;
}

.ctcv-bank-title {
    margin-top: 0;
    font-size: 18px;
    margin-bottom: 12px;
}

.ctcv-bank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    font-size: 14px;
}

.ctcv-bank-instructions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e0;
    font-size: 13px;
    color: #4a5568;
}

.ctcv-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.ctcv-kpi-box {
    background: #f8fafc;
    padding: 14px;
    border-radius: 6px;
    border: 1px solid var(--ctcv-color-border);
}

.ctcv-kpi-label { font-size: 12px; text-transform: uppercase; color: #718096; display: block; }
.ctcv-kpi-value { font-size: 20px; font-weight: 700; display: block; margin-top: 4px; }

.ctcv-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.ctcv-text-success { color: var(--ctcv-color-success); }
.ctcv-text-danger { color: var(--ctcv-color-danger); }
.ctcv-text-warning { color: var(--ctcv-color-warning); }
.ctcv-text-bold { font-weight: bold; }
.ctcv-text-muted { color: #718096; }

@media (max-width: 768px) {
    .ctcv-col-6 { flex: 1 1 100%; }
    .ctcv-action-bar .ctcv-btn { width: 100%; }
}

/* ==========================================================================
   Nuevos Componentes y Shortcodes v1.0.1 (Aislados bajo .ctcv)
   ========================================================================== */

/* 1. Botón y Selector Agregar a Tandita (Armonizado con Apariencia e IC Divi) */
.ctcv-add-to-tandita-box {
    background: var(--ctcv-add-bg, transparent);
    border: var(--ctcv-add-border, none);
    border-radius: var(--ctcv-add-radius, 8px);
    box-shadow: var(--ctcv-add-shadow, none);
    padding: var(--ctcv-add-pad-desktop, 16px);
    margin: 15px 0;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    .ctcv-add-to-tandita-box {
        padding: var(--ctcv-add-pad-mobile, 12px);
    }
}

.ctcv.ctcv-add-to-tandita-box .ctcv-add-title {
    font-family: var(--ctcv-add-title-font, inherit);
    font-size: var(--ctcv-add-title-size, 20px);
    color: var(--ctcv-add-color-primary, inherit);
    margin-top: 0;
    margin-bottom: 6px;
}

@media (max-width: 767px) {
    .ctcv.ctcv-add-to-tandita-box .ctcv-add-title {
        font-size: var(--ctcv-add-title-size-m, 18px);
    }
}

.ctcv.ctcv-add-to-tandita-box .ctcv-add-desc,
.ctcv.ctcv-add-to-tandita-box .ctcv-product-quote {
    font-family: var(--ctcv-add-body-font, inherit);
    font-size: var(--ctcv-add-body-size, 14px);
    color: var(--ctcv-add-color-sec, #64748b);
    margin-top: 0;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Marcado de Cotización Unificada (Partial product-quote) */
.ctcv.ctcv-add-to-tandita-box .ctcv-product-quote {
    color: var(--ctcv-add-color-primary, inherit);
    margin-bottom: 15px;
}

.ctcv-product-quote .ctcv-quote-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 3px 0;
    line-height: 1.4;
}

.ctcv-product-quote .ctcv-quote-label {
    color: var(--ctcv-add-color-sec, #64748b);
}

.ctcv-product-quote .ctcv-quote-val {
    font-weight: 600;
    color: var(--ctcv-add-color-primary, inherit);
}

.ctcv-product-quote .ctcv-quote-extra .ctcv-quote-val {
    color: var(--ctcv-add-color-extra, #059669);
}

.ctcv-product-quote .ctcv-quote-total {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 6px;
    padding-top: 8px;
    font-weight: 700;
}

.ctcv-product-quote .ctcv-quote-total .ctcv-slot-total {
    font-size: 1.15em;
    color: var(--ctcv-add-color-total, inherit);
}

.ctcv-product-quote.ctcv-is-estimate .ctcv-slot-total-label {
    color: #d97706;
}

.ctcv-product-quote .ctcv-quote-notice {
    font-size: 13px;
    color: var(--ctcv-add-color-sec, #64748b);
    font-style: italic;
    margin-top: 6px;
}

/* Acciones y Cantidad */
.ctcv-add-actions {
    display: flex;
    gap: var(--ctcv-add-gap, 10px);
    align-items: center;
    width: 100%;
}

.ctcv-qty-wrapper {
    flex: 0 0 auto;
}

.ctcv-qty-wrapper .ctcv-input-qty {
    width: 65px;
    min-height: 44px;
    text-align: center;
    padding: 6px;
    border: 1px solid var(--ctcv-color-border);
    border-radius: 4px;
    font-size: 15px;
}

.ctcv.ctcv-add-to-tandita-box .ctcv-btn.ctcv-btn-add-tandita {
    flex: 1;
    min-height: 44px;
    width: var(--ctcv-add-btn-width, 100%);
    background-color: var(--ctcv-add-btn-bg, var(--icdvg-cart-background, var(--ctcv-color-primary)));
    color: var(--ctcv-add-btn-text, var(--icdvg-cart-text, #ffffff));
    border: var(--ctcv-add-btn-border, none);
    border-radius: var(--ctcv-add-btn-radius, 8px);
    font-family: var(--ctcv-add-btn-font, inherit);
    font-weight: var(--ctcv-add-btn-weight, 700);
    font-size: var(--ctcv-add-btn-size, 16px);
    padding: var(--ctcv-add-btn-pad-y, 12px) var(--ctcv-add-btn-pad-x, 20px);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: background 0.2s, opacity 0.2s;
}

.ctcv.ctcv-add-to-tandita-box .ctcv-btn.ctcv-btn-add-tandita:hover:not(:disabled):not(.ctcv-disabled) {
    background-color: var(--ctcv-add-btn-hover-bg, var(--icdvg-cart-hover-background, #111111));
    color: var(--ctcv-add-btn-hover-text, var(--icdvg-cart-hover-text, #ffffff));
}

.ctcv-btn-add-tandita:disabled,
.ctcv-btn-add-tandita.ctcv-disabled {
    background-color: var(--ctcv-add-btn-dis-bg, var(--icdvg-cart-disabled-background, #94a3b8)) !important;
    color: var(--ctcv-add-btn-dis-text, var(--icdvg-cart-disabled-text, #ffffff)) !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* 2. Catálogo para Tanditas */
.ctcv-catalog-wrapper {
    margin: 25px 0;
}

.ctcv-catalog-filter-bar {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.ctcv-catalog-search {
    flex: 1;
    min-width: 240px;
    min-height: 44px;
}

.ctcv-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ctcv-catalog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ctcv-catalog-card .ctcv-card-media {
    height: 200px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.ctcv-catalog-card .ctcv-card-media img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.ctcv-catalog-card .ctcv-card-body {
    flex: 1;
    padding: 14px;
}

.ctcv-product-title {
    font-size: 16px;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.ctcv-price-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.ctcv-price-value {
    font-weight: 700;
    color: var(--ctcv-color-primary);
}

.ctcv-stock-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.ctcv-stock-badge.in-stock { background: #def7ec; color: #03543f; }
.ctcv-stock-badge.out-of-stock { background: #fde8e8; color: #9b1c1c; }

/* 3. Cesta de Tanditas */
.ctcv-cart-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

.ctcv-cart-table .ctcv-th-img,
.ctcv-cart-table .ctcv-td-img {
    width: 60px;
}

.ctcv-cart-table img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.ctcv-item-attributes {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.ctcv-attr-pill {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #475569;
}

.ctcv-cart-qty-input {
    width: 60px;
    min-height: 38px;
    text-align: center;
}

.ctcv-cart-summary-card {
    background: #f8fafc;
    border: 1px solid var(--ctcv-color-border);
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}

.ctcv-summary-title {
    font-family: var(--ctcv-font-title);
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.ctcv-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 15px;
}

.ctcv-summary-total {
    font-size: 18px;
    border-top: 1px solid var(--ctcv-color-border);
    padding-top: 12px;
    margin-top: 12px;
}

.ctcv-notice-disclaimer {
    font-size: 12px;
    color: #64748b;
    margin: 15px 0;
    line-height: 1.4;
}

.ctcv-empty-cart-state {
    text-align: center;
    padding: 50px 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed var(--ctcv-color-border);
}

.ctcv-empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* 4. Mini Resumen en Cabecera */
.ctcv-mini-cart-badge {
    display: inline-flex;
    align-items: center;
}

.ctcv-mini-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f1f5f9;
    border-radius: 20px;
    text-decoration: none;
    color: var(--ctcv-color-text);
    font-size: 13px;
    font-weight: 600;
    min-height: 44px;
    transition: background 0.2s;
}

.ctcv-mini-cart-link:hover {
    background: #e2e8f0;
}

.ctcv-mini-cart-count {
    background: var(--ctcv-color-primary);
    color: #fff;
    border-radius: 50%;
    padding: 1px 7px;
    font-size: 12px;
}

/* 5. Canje de Tandita */
.ctcv-redemption-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

.ctcv-redemption-summary-card {
    background: #f8fafc;
    border: 1px solid var(--ctcv-color-border);
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}

.ctcv-val-green { color: #16a34a; }
.ctcv-val-red { color: #dc2626; }

.ctcv-surplus-row,
.ctcv-shortfall-row {
    font-size: 17px;
    padding: 8px 0;
}

.ctcv-small-note {
    font-size: 12px;
    color: #64748b;
    margin: 5px 0 15px 0;
}

.ctcv-redemption-cta {
    margin-top: 20px;
}

@media (max-width: 900px) {
    .ctcv-cart-layout,
    .ctcv-redemption-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Mejoras y Nuevos Componentes v1.0.7
   ========================================================================== */

/* Tabla responsiva aislada para móvil (sin tocar estilos WooCommerce) */
.ctcv-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.ctcv-table-responsive > .ctcv-table {
    margin-bottom: 0;
    min-width: 580px;
}

/* Controles y botones con área táctil mínima de 44px */
.ctcv .ctcv-btn,
.ctcv .ctcv-input,
.ctcv .ctcv-select,
.ctcv .ctcv-cart-qty-input {
    min-height: 44px;
    box-sizing: border-box;
}

.ctcv .ctcv-btn-danger-outline {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
}

/* Tarjeta de simulación reactiva de cuota sugerida y fecha meta */
.ctcv-schedule-preview-card {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px 16px;
    margin: 15px 0;
}

.ctcv-schedule-preview-card .ctcv-preview-badge {
    display: inline-block;
    background: #0ea5e9;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.ctcv-schedule-preview-card .ctcv-preview-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--ctcv-color-primary, #1a1a1a);
}

.ctcv-schedule-preview-card .ctcv-preview-meta {
    font-size: 13px;
    color: #475569;
    margin-top: 4px;
}

/* Desglose de base y personalización en resumen */
.ctcv-summary-sub {
    font-size: 13px;
    color: #64748b;
    padding-left: 8px;
}

/* Modal "No puedo pagar esta aportación" y reprogramación */
.ctcv-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
    box-sizing: border-box;
}

.ctcv-modal-dialog {
    background: #ffffff;
    border-radius: 8px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.ctcv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ctcv-color-border, #e2e8f0);
}

.ctcv-modal-header h3 {
    margin: 0;
    font-family: var(--ctcv-font-title, 'DIN Condensed', sans-serif);
    font-size: 22px;
    text-transform: uppercase;
    color: var(--ctcv-color-primary, #1a1a1a);
}

.ctcv-modal-close {
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.ctcv-modal-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.ctcv-modal-body {
    padding: 20px;
}

.ctcv-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--ctcv-color-border, #e2e8f0);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.ctcv-option-card {
    display: flex;
    align-items: flex-start;
    border: 2px solid var(--ctcv-color-border, #e2e8f0);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
    min-height: 44px;
}

.ctcv-option-card:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.ctcv-option-card input[type="radio"] {
    margin-top: 3px;
    margin-right: 10px;
    min-width: 20px;
    min-height: 20px;
}

.ctcv-option-card input[type="radio"]:checked + .ctcv-option-content {
    color: var(--ctcv-color-primary, #1a1a1a);
}

.ctcv-option-card.ctcv-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.ctcv-option-content {
    flex: 1;
}

.ctcv-option-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.ctcv-option-details {
    font-size: 13px;
    color: #475569;
}

.ctcv-option-disabled-reason {
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
    font-style: italic;
}

/* Alerta de recotización o conflicto de cotización */
.ctcv-alert-quote-changed {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.ctcv-alert-quote-changed h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #92400e;
}

.ctcv-quote-changed-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

/* Previsualización reactiva de aportación */
.ctcv-aportacion-preview-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 14px;
    margin: 16px 0;
}

.ctcv-aportacion-preview-card .ctcv-preview-list {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.6;
    color: #334155;
}

