/**
 * Tash Counselling Legal Suite - Estilos CSS
 * Version: 1.0.0
 * Author: RamXDigital
 */

/* ============================================
   VARIABLES CSS PERSONALIZADAS
   ============================================ */
:root {
    /* Colores principales - Paleta de Tash */
    --tcl-mocha-primary: #8B7355;
    --tcl-mocha-dark: #6B5A45;
    --tcl-mocha-light: #A89280;
    --tcl-sage: #8B9A6A;
    --tcl-sage-dark: #6B7A4A;
    --tcl-sage-light: #9BAA7A;
    --tcl-terra: #A47764;
    --tcl-sand: #E8E4DD;
    --tcl-pearl: #F5F2ED;
    --tcl-cream: #FAF8F5;
    --tcl-linen: #F0ECE5;
    
    /* Espaciados */
    --tcl-space-xs: 0.25rem;
    --tcl-space-sm: 0.5rem;
    --tcl-space-md: 1rem;
    --tcl-space-lg: 1.5rem;
    --tcl-space-xl: 2rem;
    --tcl-space-2xl: 3rem;
    
    /* Tipografía */
    --tcl-font-serif: 'Fraunces', Georgia, serif;
    --tcl-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Sombras */
    --tcl-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --tcl-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --tcl-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --tcl-shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);
}

/* ============================================
   COOKIE BANNER - VERSIÓN CORREGIDA
   ============================================ */
.tcl-cookie-banner {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 100% !important;
    max-width: 420px !important;
    background: var(--tcl-cream) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    z-index: 999999 !important;
    animation: tclSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(139, 115, 85, 0.2) !important;
    backdrop-filter: blur(10px);
    background: rgba(250, 248, 245, 0.98) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.tcl-cookie-container {
    padding: 18px !important;
}

.tcl-cookie-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
}

.tcl-cookie-icon {
    width: 28px !important;
    height: 28px !important;
    flex-shrink: 0 !important;
    color: var(--tcl-sage) !important;
}

.tcl-cookie-header h3 {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--tcl-mocha-dark) !important;
    font-family: var(--tcl-font-serif) !important;
    line-height: 1.2 !important;
}

.tcl-cookie-content p {
    margin: 0 0 12px 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    color: #5A5A5A !important;
    font-family: var(--tcl-font-sans) !important;
}

.tcl-cookie-links {
    font-size: 11px !important;
    margin-top: 10px !important;
    opacity: 0.8 !important;
}

/* Cookie Details */
.tcl-cookie-details {
    margin: 12px 0 !important;
}

.tcl-cookie-details summary {
    cursor: pointer !important;
    color: var(--tcl-mocha-primary) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 6px 10px !important;
    background: var(--tcl-pearl) !important;
    border-radius: 6px !important;
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: all 0.2s !important;
    font-family: var(--tcl-font-sans) !important;
}

.tcl-cookie-types {
    padding: 12px 10px 6px !important;
    background: var(--tcl-pearl) !important;
    border-radius: 0 0 6px 6px !important;
    margin-top: -4px !important;
}

.tcl-cookie-option {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    cursor: pointer !important;
    padding: 6px !important;
    border-radius: 4px !important;
    transition: background 0.2s !important;
}

.tcl-cookie-option input[type="checkbox"] {
    margin-top: 2px !important;
    width: 16px !important;
    height: 16px !important;
    accent-color: var(--tcl-sage) !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.tcl-cookie-label strong {
    display: block !important;
    font-size: 13px !important;
    color: var(--tcl-mocha-dark) !important;
    margin-bottom: 2px !important;
    font-weight: 600 !important;
}

.tcl-cookie-label small {
    font-size: 11px !important;
    color: #6B6B6B !important;
    line-height: 1.3 !important;
}

/* Cookie Actions - BOTONES CORREGIDOS */
.tcl-cookie-actions {
    display: flex !important;
    gap: 8px !important;
    justify-content: flex-end !important;
    margin-top: 14px !important;
}

.tcl-btn {
    padding: 7px 14px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    font-family: var(--tcl-font-sans) !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 90px !important;
    height: 32px !important;
    line-height: 1 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.tcl-btn-secondary {
    background: transparent !important;
    color: var(--tcl-mocha-primary) !important;
    border: 1px solid rgba(139, 115, 85, 0.3) !important;
}

.tcl-btn-secondary:hover {
    background: var(--tcl-pearl) !important;
    border-color: var(--tcl-mocha-light) !important;
}

.tcl-btn-primary {
    background: var(--tcl-sage) !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(139, 154, 106, 0.3) !important;
}

.tcl-btn-primary:hover {
    background: var(--tcl-sage-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 3px 8px rgba(139, 154, 106, 0.4) !important;
}

/* ============================================
   PÁGINAS LEGALES
   ============================================ */
.tcl-legal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: var(--tcl-font-sans);
}

.tcl-legal-header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 2px solid var(--tcl-sand);
}

.tcl-legal-header h1 {
    font-family: var(--tcl-font-serif);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--tcl-mocha-dark);
    margin-bottom: 16px;
    font-weight: 400;
    letter-spacing: -0.02em;
}

.tcl-legal-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #7A7A7A;
}

.tcl-legal-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Legal Content */
.tcl-legal-content {
    font-size: 16px;
    line-height: 1.8;
    color: #4A4A4A;
}

.tcl-legal-content h2 {
    font-family: var(--tcl-font-serif);
    font-size: 1.875rem;
    color: var(--tcl-mocha-dark);
    margin: 48px 0 24px;
    position: relative;
    padding-left: 24px;
    font-weight: 400;
}

.tcl-legal-content h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 28px;
    background: linear-gradient(135deg, var(--tcl-sage) 0%, var(--tcl-terra) 100%);
    border-radius: 2px;
}

.tcl-legal-content h3 {
    font-size: 1.375rem;
    color: var(--tcl-mocha-primary);
    margin: 32px 0 16px;
    font-weight: 600;
}

.tcl-legal-content h4 {
    font-size: 1.125rem;
    color: #5A5A5A;
    margin: 24px 0 12px;
    font-weight: 600;
}

.tcl-legal-content p {
    margin-bottom: 20px;
}

.tcl-legal-content ul,
.tcl-legal-content ol {
    margin: 20px 0;
    padding-left: 28px;
}

.tcl-legal-content li {
    margin-bottom: 12px;
    line-height: 1.7;
}

.tcl-legal-content ul li::marker {
    color: var(--tcl-sage);
}

.tcl-legal-content strong {
    color: var(--tcl-mocha-dark);
    font-weight: 600;
}

/* Info Boxes */
.tcl-info-box {
    background: linear-gradient(135deg, var(--tcl-pearl) 0%, var(--tcl-linen) 100%);
    border-left: 4px solid var(--tcl-sage);
    padding: 24px;
    border-radius: 8px;
    margin: 32px 0;
}

.tcl-info-box h4 {
    margin-top: 0;
    color: var(--tcl-mocha-dark);
    font-size: 1.125rem;
    font-weight: 600;
}

.tcl-info-box p:last-child {
    margin-bottom: 0;
}

/* Contact Box */
.tcl-contact-box {
    background: white;
    border: 1px solid var(--tcl-sand);
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
    box-shadow: var(--tcl-shadow-sm);
}

.tcl-contact-box h4 {
    color: var(--tcl-mocha-primary);
    margin-bottom: 16px;
    font-size: 1.125rem;
}

.tcl-contact-box p {
    margin: 8px 0;
}

/* Tables */
.tcl-legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 32px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--tcl-shadow-md);
}

.tcl-legal-table thead {
    background: var(--tcl-sage);
}

.tcl-legal-table th {
    color: white;
    padding: 14px 16px;
    text-align: left;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.tcl-legal-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--tcl-sand);
    font-size: 14px;
    color: #5A5A5A;
}

.tcl-legal-table tbody tr:last-child td {
    border-bottom: none;
}

.tcl-legal-table tbody tr:hover {
    background: var(--tcl-pearl);
    transition: background 0.2s;
}

/* Legal Footer */
.tcl-legal-footer {
    margin-top: 60px;
    padding-top: 32px;
    border-top: 2px solid var(--tcl-sand);
    text-align: center;
}

.tcl-legal-footer p {
    color: #7A7A7A;
    font-size: 14px;
    margin: 8px 0;
}

/* Cookie Settings Button */
.tcl-cookie-settings-btn {
    background: var(--tcl-sage);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    font-family: var(--tcl-font-sans);
}

.tcl-cookie-settings-btn:hover {
    background: var(--tcl-sage-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 154, 106, 0.3);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .tcl-cookie-banner {
        bottom: 0;
        left: 0;
        right: 0;
        max-width: none;
        border-radius: 16px 16px 0 0;
    }
    
    .tcl-cookie-container {
        padding: 20px;
    }
    
    .tcl-cookie-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .tcl-btn {
        width: 100%;
        min-width: auto;
    }
    
    .tcl-legal-page {
        padding: 40px 16px;
    }
    
    .tcl-legal-content h2 {
        font-size: 1.5rem;
        padding-left: 16px;
    }
    
    .tcl-legal-content h2::before {
        height: 20px;
        width: 3px;
    }
    
    .tcl-legal-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .tcl-legal-table {
        font-size: 13px;
    }
    
    .tcl-legal-table th,
    .tcl-legal-table td {
        padding: 10px 12px;
    }
}

@media (max-width: 480px) {
    .tcl-cookie-header h3 {
        font-size: 16px;
    }
    
    .tcl-cookie-content p {
        font-size: 13px;
    }
    
    .tcl-legal-header h1 {
        font-size: 1.75rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .tcl-cookie-banner {
        display: none !important;
    }
    
    .tcl-cookie-settings-btn {
        display: none !important;
    }
    
    .tcl-legal-page {
        max-width: none;
        padding: 0;
    }
    
    .tcl-legal-content {
        color: black;
    }
    
    .tcl-legal-content h1,
    .tcl-legal-content h2,
    .tcl-legal-content h3,
    .tcl-legal-content h4 {
        color: black;
        page-break-after: avoid;
    }
    
    .tcl-legal-table {
        page-break-inside: avoid;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .tcl-cookie-banner {
        animation: none;
    }
    
    .tcl-btn {
        transition: none;
    }
    
    .tcl-cookie-details summary::after {
        transition: none;
    }
}

@media (prefers-color-scheme: dark) {
    /* Opcional: Añadir soporte para modo oscuro */
}

/* Focus styles for keyboard navigation */
.tcl-btn:focus,
.tcl-cookie-details summary:focus,
.tcl-cookie-option input:focus {
    outline: 2px solid var(--tcl-sage);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .tcl-cookie-banner {
        border: 2px solid currentColor;
    }
    
    .tcl-btn {
        border: 2px solid currentColor;
    }
}