/* SalesCloud Calculator - Estilos v2.0 */
/* Con secciones colapsables y SVG sticky */

.sccalc-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.sccalc-wrapper * {
    box-sizing: border-box;
}

.sccalc-title {
    text-align: center;
    color: #000066;
    margin-bottom: 10px;
    font-size: 1.8em;
}

.sccalc-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 0.95em;
}

/* === LAYOUT DOS COLUMNAS === */
.sccalc-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.sccalc-form-column {
    flex: 1;
    min-width: 0;
}

.sccalc-preview-column {
    width: 380px;
    flex-shrink: 0;
}

.sccalc-preview-sticky {
    position: sticky;
    top: 20px;
}

/* === SECCIONES COLAPSABLES === */
.sccalc-section {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.sccalc-section.active {
    border-color: #2AB9AD;
    box-shadow: 0 2px 12px rgba(42, 185, 173, 0.15);
}

.sccalc-section.completed {
    border-color: #4caf50;
}

.sccalc-section-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: #f8f9fa;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.sccalc-section-header:hover {
    background: #f0f2f5;
}

.sccalc-section.active .sccalc-section-header {
    background: linear-gradient(135deg, #e8faf9, #d4f5f3);
}

.sccalc-section.completed .sccalc-section-header {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
}

.sccalc-section-number {
    width: 28px;
    height: 28px;
    background: #2AB9AD;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
    margin-right: 12px;
    flex-shrink: 0;
}

.sccalc-section.completed .sccalc-section-number {
    background: #4caf50;
}

.sccalc-section.completed .sccalc-section-number::after {
    content: "✓";
}

.sccalc-section.completed .sccalc-section-number {
    font-size: 0;
}

.sccalc-section.completed .sccalc-section-number::after {
    font-size: 14px;
}

.sccalc-section-title {
    flex: 1;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.sccalc-section-summary {
    font-size: 0.85em;
    color: #666;
    margin-right: 10px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sccalc-section.completed .sccalc-section-summary {
    color: #4caf50;
    font-weight: 500;
}

.sccalc-section-toggle {
    color: #999;
    font-size: 0.8em;
    transition: transform 0.3s;
}

.sccalc-section.collapsed .sccalc-section-toggle {
    transform: rotate(-90deg);
}

.sccalc-section-content {
    padding: 16px;
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
    opacity: 1;
}

.sccalc-section.collapsed .sccalc-section-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* === VISTA PREVIA SVG === */
.sccalc-preview-container {
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    overflow: hidden;
}

.sccalc-preview-container.active {
    border-color: #2AB9AD;
}

.sccalc-preview-label {
    font-size: 0.9em;
    color: #333;
    text-align: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #2AB9AD, #1a9a8f);
    color: #fff;
    font-weight: 600;
}

.sccalc-preview {
    background: #fff;
    padding: 15px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sccalc-preview svg {
    max-width: 100%;
    max-height: 350px;
    width: 100%;
}

.sccalc-preview svg text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Leyenda del SVG */
.sccalc-preview-legend {
    padding: 12px 15px;
    background: #f0f2f5;
    border-top: 1px solid #e0e0e0;
    font-size: 0.8em;
}

.sccalc-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.sccalc-legend-item:last-child {
    margin-bottom: 0;
}

.sccalc-legend-color {
    width: 16px;
    height: 4px;
    border-radius: 2px;
}

.sccalc-legend-color.edge-polished {
    background: #2AB9AD;
    height: 4px;
}

.sccalc-legend-color.edge-normal {
    background: #78909c;
    height: 2px;
}

.sccalc-legend-color.corner {
    width: 12px;
    height: 12px;
    background: #2AB9AD;
    border-radius: 50%;
}

.sccalc-legend-color.hole {
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #e65100;
    border-radius: 50%;
}

.sccalc-legend-color.notch {
    width: 12px;
    height: 12px;
    background: #fff;
    border: 2px solid #9c27b0;
}

/* === FORMULARIO === */
.sccalc-form {
    display: flex;
    flex-direction: column;
}

.sccalc-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sccalc-row.two-cols > .sccalc-field {
    flex: 1;
    min-width: 140px;
}

.sccalc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sccalc-field.full-width {
    width: 100%;
}

.sccalc-field label {
    font-weight: 600;
    color: #333;
    font-size: 0.9em;
}

.sccalc-field input,
.sccalc-field select {
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    min-height: 48px;
    line-height: 1.4;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sccalc-field input:focus,
.sccalc-field select:focus {
    outline: none;
    border-color: #2AB9AD;
    box-shadow: 0 0 0 3px rgba(42, 185, 173, 0.15);
}

.sccalc-field input[type="number"] {
    -moz-appearance: textfield;
}

.sccalc-field input[type="number"]::-webkit-outer-spin-button,
.sccalc-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Checkbox group */
.sccalc-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.sccalc-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #2AB9AD;
}

.sccalc-checkbox-group label {
    font-weight: normal;
    cursor: pointer;
}

/* === TIPOS DE VIDRIO === */
.sccalc-glass-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.sccalc-glass-type {
    padding: 12px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.sccalc-glass-type:hover {
    border-color: #2AB9AD;
    background: #f8ffff;
}

.sccalc-glass-type.selected {
    border-color: #2AB9AD;
    background: linear-gradient(135deg, #e8faf9, #d4f5f3);
}

.sccalc-glass-type-name {
    font-weight: 600;
    font-size: 0.85em;
    color: #333;
}

/* === SELECTORES COMPLETOS === */
.sccalc-select-full {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    min-height: 48px;
    line-height: 1.4;
    background: #fff;
    cursor: pointer;
}

.sccalc-select-full:focus {
    outline: none;
    border-color: #2AB9AD;
    box-shadow: 0 0 0 3px rgba(42, 185, 173, 0.15);
}

/* === CANTOS === */
.sccalc-cantos-selector {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
}

.sccalc-cantos-selector > label:first-child {
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
    display: block;
    margin-bottom: 10px;
}

.sccalc-cantos-checks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.sccalc-canto-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s;
}

.sccalc-canto-check:hover {
    background: #e8f5f4;
}

.sccalc-canto-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2AB9AD;
}

/* === ESQUINAS === */
.sccalc-esquinas-selector {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
}

.sccalc-esquinas-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.sccalc-esquinas-visual {
    flex: 1;
    min-width: 150px;
}

.sccalc-esquinas-visual > label,
.sccalc-radio-selector > label {
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
    display: block;
    margin-bottom: 10px;
}

.sccalc-radio-selector {
    flex: 1;
    min-width: 150px;
}

.sccalc-esquina-box {
    width: 120px;
    height: 100px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 2px solid #78909c;
    border-radius: 4px;
    position: relative;
}

.sccalc-esquina-check {
    position: absolute;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sccalc-esquina-check.top-left { top: -16px; left: -16px; }
.sccalc-esquina-check.top-right { top: -16px; right: -16px; }
.sccalc-esquina-check.bottom-left { bottom: -16px; left: -16px; }
.sccalc-esquina-check.bottom-right { bottom: -16px; right: -16px; }

.sccalc-esquina-check input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.sccalc-esquina-check span {
    width: 28px;
    height: 28px;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s;
}

.sccalc-esquina-check input:checked + span {
    background: #2AB9AD;
    border-color: #2AB9AD;
    color: #fff;
}

/* === TALADRO GAS === */
.sccalc-taladro-gas-config {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
}

.sccalc-taladro-gas-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.sccalc-taladro-posicion,
.sccalc-taladro-diametro {
    flex: 1;
    min-width: 180px;
}

.sccalc-taladro-posicion > label,
.sccalc-taladro-diametro > label {
    font-weight: 600;
    font-size: 0.9em;
    color: #333;
    display: block;
    margin-bottom: 10px;
}

.sccalc-posicion-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    max-width: 150px;
}

.sccalc-pos-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.sccalc-pos-check:hover {
    border-color: #2AB9AD;
    background: #e8f5f4;
}

.sccalc-pos-check input {
    position: absolute;
    opacity: 0;
}

.sccalc-pos-check:has(input:checked) {
    background: #2AB9AD;
    border-color: #2AB9AD;
    color: #fff;
}

.sccalc-pos-custom label {
    font-size: 0.85em;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.sccalc-pos-inputs {
    display: flex;
    gap: 10px;
}

.sccalc-pos-inputs input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9em;
}

.sccalc-pos-inputs input:focus {
    outline: none;
    border-color: #2AB9AD;
}

/* === MANUFACTURAS === */
.sccalc-manufacturas-lista {
    margin-top: 10px;
}

.sccalc-manuf-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f0f7f6;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #2AB9AD;
}

.sccalc-manuf-nombre {
    flex: 1;
    font-size: 0.9em;
    color: #333;
}

.sccalc-manuf-precio {
    font-size: 0.85em;
    color: #666;
    min-width: 80px;
    text-align: right;
}

.sccalc-manuf-cant {
    width: 50px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-size: 0.9em;
}

.sccalc-remove-manuf {
    width: 28px;
    height: 28px;
    border: none;
    background: #ffebee;
    color: #c62828;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s;
}

.sccalc-remove-manuf:hover {
    background: #ffcdd2;
}

/* === BOTONES === */
.sccalc-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 15px;
}

.sccalc-btn-primary {
    background: linear-gradient(135deg, #2AB9AD, #1a9a8f);
    color: #fff;
}

.sccalc-btn-primary:hover {
    background: linear-gradient(135deg, #1a9a8f, #158f84);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 185, 173, 0.4);
}

.sccalc-btn-secondary {
    background: #000066;
    color: #fff;
}

.sccalc-btn-secondary:hover {
    background: #000044;
}

.sccalc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* === RESULTADO === */
.sccalc-result {
    display: none;
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border-left: 4px solid #2AB9AD;
}

.sccalc-result.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sccalc-result-title {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
}

.sccalc-result-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.sccalc-result-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95em;
}

.sccalc-result-row.total {
    font-weight: 700;
    font-size: 1.3em;
    color: #2AB9AD;
    padding-top: 10px;
    border-top: 2px dashed #ccc;
    margin-top: 10px;
}

.sccalc-result-row.with-iva {
    font-size: 1.1em;
    color: #000066;
}

.sccalc-result-note {
    font-size: 0.85em;
    color: #666;
    font-style: italic;
    margin-top: 15px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
}

/* === FORMULARIO CONTACTO === */
.sccalc-quote-form {
    display: none;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid #e0e0e0;
}

.sccalc-quote-form.show {
    display: block;
}

.sccalc-quote-title {
    font-size: 1.1em;
    color: #000066;
    margin-bottom: 15px;
    font-weight: 600;
}

.sccalc-quote-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.sccalc-quote-form textarea:focus {
    outline: none;
    border-color: #2AB9AD;
    box-shadow: 0 0 0 3px rgba(42, 185, 173, 0.15);
}

/* === MENSAJES === */
.sccalc-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    display: none;
}

.sccalc-message.show {
    display: block;
}

.sccalc-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sccalc-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* === LOADER === */
.sccalc-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === RESPONSIVE TABLETS === */
@media (max-width: 900px) {
    .sccalc-layout {
        flex-direction: column;
    }

    .sccalc-preview-column {
        width: 100%;
        order: -1;
        margin-bottom: 20px;
    }

    .sccalc-preview-sticky {
        position: relative;
        top: 0;
    }

    .sccalc-preview {
        min-height: 250px;
    }

    .sccalc-preview svg {
        max-height: 280px;
    }
}

@media (max-width: 768px) {
    .sccalc-wrapper {
        padding: 20px 15px;
        border-radius: 8px;
    }

    .sccalc-row.two-cols > .sccalc-field {
        min-width: 45%;
    }

    .sccalc-title {
        font-size: 1.5em;
    }

    .sccalc-section-title {
        font-size: 0.9em;
    }

    .sccalc-section-summary {
        max-width: 100px;
    }
}

/* === RESPONSIVE MOVILES === */
@media (max-width: 600px) {
    .sccalc-wrapper {
        padding: 15px 12px;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .sccalc-row {
        flex-direction: column;
        gap: 12px;
    }

    .sccalc-row.two-cols > .sccalc-field {
        min-width: 100%;
    }

    .sccalc-title {
        font-size: 1.3em;
    }

    .sccalc-subtitle {
        font-size: 0.85em;
        margin-bottom: 20px;
    }

    .sccalc-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 1em;
    }

    .sccalc-field input,
    .sccalc-field select,
    .sccalc-select-full {
        padding: 12px;
        font-size: 16px; /* Evita zoom en iOS */
    }

    .sccalc-result {
        padding: 20px 15px;
        margin-top: 20px;
    }

    .sccalc-result-row.total {
        font-size: 1.2em;
    }

    .sccalc-glass-types {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .sccalc-glass-type {
        padding: 10px 8px;
    }

    .sccalc-glass-type-name {
        font-size: 0.8em;
    }

    .sccalc-cantos-checks {
        grid-template-columns: 1fr;
    }

    .sccalc-esquinas-row,
    .sccalc-taladro-gas-row {
        flex-direction: column;
    }

    .sccalc-posicion-grid {
        margin: 0 auto;
    }

    .sccalc-manuf-item {
        flex-wrap: wrap;
    }

    .sccalc-manuf-nombre {
        width: 100%;
        margin-bottom: 5px;
    }

    .sccalc-section-header {
        padding: 12px 14px;
    }

    .sccalc-section-number {
        width: 24px;
        height: 24px;
        font-size: 0.8em;
        margin-right: 10px;
    }

    .sccalc-section-summary {
        display: none;
    }
}

/* === RESPONSIVE MOVILES PEQUEÑOS === */
@media (max-width: 400px) {
    .sccalc-wrapper {
        padding: 12px 10px;
    }

    .sccalc-title {
        font-size: 1.2em;
    }

    .sccalc-field label {
        font-size: 0.85em;
    }

    .sccalc-preview {
        min-height: 200px;
    }

    .sccalc-preview svg {
        max-height: 220px;
    }
}

/* === INFO ICON === */
.sccalc-info {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #2AB9AD;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    margin-left: 5px;
}

/* === AREA MINIMA WARNING === */
.sccalc-min-area-warning {
    color: #856404;
    background: #fff3cd;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    margin-top: 10px;
    text-align: center;
    border: 1px solid #ffc107;
}

/* ========================================
   PRECIO STICKY - DESKTOP
   ======================================== */
.sccalc-price-sticky {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 20px;
    position: relative;
}

.sccalc-sticky-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #2AB9AD, #1a9a8f);
    color: #fff;
}

.sccalc-sticky-title {
    font-weight: 600;
    font-size: 1em;
}

.sccalc-sticky-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.sccalc-sticky-body {
    padding: 15px 20px;
    display: none;
}

.sccalc-price-sticky.has-price .sccalc-sticky-body {
    display: block;
}

.sccalc-sticky-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9em;
    border-bottom: 1px solid #f0f0f0;
}

.sccalc-sticky-row:last-child {
    border-bottom: none;
}

.sccalc-sticky-subtotal {
    font-weight: 600;
    border-top: 2px dashed #e0e0e0;
    margin-top: 5px;
    padding-top: 12px;
}

.sccalc-sticky-total {
    font-size: 1.15em;
    font-weight: 700;
    color: #2AB9AD;
    border-top: none;
    padding-top: 8px;
}

.sccalc-sticky-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
}

.sccalc-sticky-footer .sccalc-btn {
    width: 100%;
    margin-top: 0;
}

.sccalc-sticky-hint {
    padding: 25px 20px;
    text-align: center;
    color: #999;
    font-size: 0.9em;
}

.sccalc-price-sticky.has-price .sccalc-sticky-hint {
    display: none;
}

/* Loading state */
.sccalc-price-sticky.loading {
    pointer-events: none;
}

.sccalc-price-sticky.loading .sccalc-sticky-body {
    opacity: 0.5;
}

.sccalc-price-sticky.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f0f0f0;
    border-top-color: #2AB9AD;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 10;
}

/* ========================================
   RESPONSIVE - PRECIO STICKY SIEMPRE VISIBLE
   ======================================== */

/* Ocultar resultado antiguo (ya no se usa) */
.sccalc-result {
    display: none !important;
}

/* En móvil, el sticky se queda en su columna (que va arriba) */
@media (max-width: 899px) {
    .sccalc-price-sticky {
        position: relative;
        margin-top: 15px;
    }
}

/* ========================================
   SELECTOR DE COLOR LACADO
   ======================================== */
.sccalc-lacado-color-selector {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #e0e0e0;
}

.sccalc-lacado-color-selector > label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-size: 0.95em;
}

.sccalc-color-options {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sccalc-color-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.2s;
    background: #f8f9fa;
}

.sccalc-color-option:hover {
    background: #f0f2f5;
    border-color: #ddd;
}

.sccalc-color-option input[type="radio"] {
    display: none;
}

.sccalc-color-option input[type="radio"]:checked + .sccalc-color-swatch {
    box-shadow: 0 0 0 3px #2AB9AD;
}

.sccalc-color-option input[type="radio"]:checked ~ .sccalc-color-name {
    color: #2AB9AD;
    font-weight: 600;
}

.sccalc-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: box-shadow 0.2s;
}

.sccalc-color-name {
    font-size: 0.85em;
    color: #555;
    transition: color 0.2s;
}

/* Animación del SVG según tipo */
.sccalc-preview-svg path {
    transition: fill 0.3s ease, stroke 0.3s ease;
}

/* ========================================
   SELECTOR RAL MEJORADO
   ======================================== */
.sccalc-color-ral {
    font-size: 0.7em;
    color: #888;
    display: block;
    margin-top: 2px;
}

.sccalc-color-option input[type="radio"]:checked ~ .sccalc-color-ral {
    color: #2AB9AD;
}

/* Swatch custom */
.sccalc-custom-swatch {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ccc 25%, #999 25%, #999 50%, #ccc 50%, #ccc 75%, #999 75%) !important;
    background-size: 8px 8px !important;
    color: #333;
    font-weight: bold;
    font-size: 1.2em;
}

/* Campo RAL personalizado */
.sccalc-ral-custom {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

.sccalc-ral-custom > label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.sccalc-ral-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sccalc-ral-prefix {
    font-weight: 600;
    color: #666;
    padding: 8px 12px;
    background: #e9ecef;
    border-radius: 6px 0 0 6px;
    border: 1px solid #ced4da;
    border-right: none;
}

#sccalc-ral-input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 0 6px 6px 0;
    font-size: 1em;
    font-weight: 600;
    letter-spacing: 2px;
    text-align: center;
}

#sccalc-ral-input:focus {
    border-color: #2AB9AD;
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 185, 173, 0.15);
}

.sccalc-btn-small {
    padding: 8px 16px;
    background: #2AB9AD;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.sccalc-btn-small:hover {
    background: #239e94;
}

.sccalc-ral-hint {
    margin: 8px 0 0;
    font-size: 0.8em;
    color: #888;
}

/* Grid de colores más compacto */
.sccalc-color-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
    gap: 10px;
}

.sccalc-color-option {
    padding: 10px 8px;
}

.sccalc-color-swatch {
    width: 36px;
    height: 36px;
}

@media (max-width: 600px) {
    .sccalc-color-options {
        grid-template-columns: repeat(3, 1fr);
    }
}
