/* Base - CSS */
#calc.calculator {
    max-width: 1100px;
    min-height: 520px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Layout - Grid responsivo */
#calc .calculator-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

#calc .products-column {
    min-height: 200px;
}

#calc .totals-column {
    position: sticky;
    top: 2rem;
}

/* Headings genéricos */
#calc .section-heading {
    font-size: 1.5rem;
    font-weight: 400;
    color: #333;
    margin: 0 0 1.5rem 0;
    line-height: 1.3;
}

/* Toggle - botón de precio */
#calc .price-mode-toggle {
    max-width: 300px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#calc .toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: #99dde9;
    border-radius: 14px;
    cursor: pointer;
    transition: 0.2s ease;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2), 0 1px 3px rgba(0, 0, 0, 0.1);
}

#calc .toggle-switch.active {
    background: #00abc7;
}

#calc .toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.15);
}

#calc .toggle-switch.active .toggle-slider {
    transform: translateX(24px);
}

#calc .toggle-label {
    color: #666;
    transition: 0.2s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
}

#calc .toggle-label.active {
    color: #00abc7;
    background: #dff3f6;
    font-weight: 700;
}

/* Plans grid */
#calc .plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Items - tarjetas genéricas */
#calc .item {
    display: grid;
    gap: 0.75rem;
    align-items: center;
    transition: 0.2s ease;
    cursor: pointer;
    position: relative;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
}

#calc .item:hover {
    border-color: #00abc7;
    box-shadow: 0 2px 8px rgba(0, 171, 199, 0.12);
    transform: translateY(-1px);
}

/* Plan types */
#calc .item[data-type="radio"] {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: 60px;
    margin-bottom: 0;
}

#calc .item[data-type="radio"] input[type="radio"] {
    display: none;
}

#calc .item[data-type="checkbox"] {
    grid-template-columns: auto 1fr auto;
}

/* States */
#calc .item.principal {
    background: #dff3f6;
    border-color: #00abc7;
    box-shadow: 0 1px 4px rgba(0, 171, 199, 0.15);
}

#calc .item.extra.included {
    background: #dff3f6;
    border-color: #61cfe0;
}

#calc .item.extra.included::after {
    content: '✓';
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 20px;
    height: 20px;
    background: #00abc7;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

#calc .item.not-available {
    background: #f9f9f9;
    border-color: #ddd;
    opacity: 0.6;
    cursor: not-allowed;
}

#calc .item.not-available:hover {
    transform: none;
    box-shadow: none;
}

/* Inputs */
#calc .item input[type="radio"],
#calc .item input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
    width: 24px;
    height: 24px;
    accent-color: #00abc7;
    transform: scale(1.2);
}

#calc .item input[type="number"] {
    width: 70px;
    text-align: center;
    border-radius: 6px;
    transition: 0.2s ease;
    padding: 0.5rem;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 0.9rem;
}

#calc .item input[type="number"]:focus {
    border-color: #00abc7;
    box-shadow: 0 0 0 3px rgba(0, 171, 199, 0.15);
    outline: none;
}

#calc .item input[type="number"]:disabled {
    background: #f9f9f9;
    color: #666;
    border-color: #ddd;
    opacity: 0.6;
}

#calc .item label {
    cursor: pointer;
    flex: 1;
    display: flex;
    flex-direction: column;
    color: #333;
    font-size: 1rem;
    margin: 0;
}

#calc .item input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#calc .price-indicator {
    font-size: 0.8rem;
    color: #666;
    border-radius: 12px;
    display: inline-block;
    margin-top: 0.25rem;
    padding: 0.2rem 0.5rem;
    background: #f9f9f9;
}

#calc .item.extra.included .price-indicator {
    color: #005d70;
    background: rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

/* Groups */
#calc .neuronup2go-group {
    background: rgba(0, 171, 199, 0.02);
    border: 1px solid rgba(0, 171, 199, 0.1);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    list-style: none !important;
}

#calc .neuronup2go-group .item {
    margin-bottom: 0.4rem;
    background: #fff;
    border: 1px solid rgba(0, 171, 199, 0.15);
}

#calc .neuronup2go-group .item:last-child {
    margin-bottom: 0;
}

#calc .neuronup2go-group .item:hover {
    border-color: #00abc7;
    box-shadow: 0 2px 8px rgba(0, 171, 199, 0.15);
}

/* Totals */
#calc .totales {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: relative;
}

#calc .totales>div:first-child {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: rgba(44, 44, 44, 0.7);
}

#calc .totales span {
    font-weight: 700;
    color: #00abc7;
}

/* Messages */
#calc .descuento-mensaje {
    margin-top: 1rem;
    background: #dff3f6;
    border: 1px solid #61cfe0;
    border-radius: 8px;
    text-align: center;
    font-size: 0.75rem;
}

#calc .pago-unico {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    background: rgba(0, 171, 199, 0.05);
    border-radius: 6px;
}

#calc .pago-unico-label {
    font-weight: 700;
    color: #00abc7;
}

/* Loading */
#calc #loadingMsg {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    color: #666;
    font-size: 1rem;
}

/* Botón genérico para solicitar información */
#calc .request-info-btn {
    background-color: #00abc7;
    border-radius: 6px;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: inline-block;
}

#calc .request-info-btn:hover {
    background-color: #008096;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 171, 199, 0.3);
}

#calc .request-info-btn:focus {
    color: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 171, 199, 0.3);
}

#calc .request-info-btn:active {
    transform: translateY(0);
}

/* Responsive - breakpoints genéricos */
@media (max-width: 992px) and (min-width: 769px) {
    #calc .calculator-layout {
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    #calc.calculator {
        padding: 1rem;
    }

    #calc .calculator-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    #calc .totals-column {
        position: static;
        order: -1;
    }

    #calc .totals-title {
        display: none;
    }

    #calc .plans-grid {
        grid-template-columns: 1fr;
    }

    #calc .item input[type="number"] {
        width: 60px;
        font-size: 16px;
        /* Prevent iOS zoom */
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Estilos específicos del HTML */
#calc .price-mode-toggle.toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0 auto 2rem;
    padding: 0.75rem 1.5rem;
    border-radius: 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

#calc .toggle-label {
    user-select: none;
    font-size: 1rem;
}

#calc .features-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#calc .totals-container.br-1010 {
    padding: 1.5rem;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Mensaje de error cuando la calculadora no está disponible */
#calc .calculator-error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 450px;
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
}

#calc .calculator-error-content {
    color: #6c757d;
}

#calc .calculator-error-title {
    color: #495057;
    margin-bottom: 1rem;
}

#calc .calculator-error-text {
    margin: 0;
}

/* Mensaje para seleccionar plan */
#calc .select-plan-message {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
}

#calc #secondaryInfo {
    display: none;
}

#calc .pago-unico {
    display: none;
    padding: 0.75rem;
}

#calc .descuento-mensaje {
    display: none;
    padding: 1rem;
}

#calc #descuentoTexto {
    color: #005d70;
    font-weight: 600;
}
