/* ============================================
   THROMBIA - Estilos Legales y Cookies
   RGPD / LOPD-GDD / LSSI-CE Compliant
   ============================================ */

/* Banner de Cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: white;
    padding: 20px;
    z-index: 99999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    display: none;
}

.cookie-banner.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cookie-header h3 {
    margin: 0;
    font-size: 18px;
    color: white;
}

.cookie-text {
    font-size: 14px;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.cookie-text a {
    color: #60a5fa;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-btn-accept {
    background: #22c55e;
    color: white;
}

.cookie-btn-accept:hover {
    background: #16a34a;
}

.cookie-btn-reject {
    background: #ef4444;
    color: white;
}

.cookie-btn-reject:hover {
    background: #dc2626;
}

.cookie-btn-customize {
    background: transparent;
    color: #60a5fa;
    border: 1px solid #60a5fa;
}

.cookie-btn-customize:hover {
    background: #60a5fa;
    color: white;
}

.cookie-btn-partial {
    background: #f59e0b;
    color: white;
}

.cookie-btn-partial:hover {
    background: #d97706;
}

/* Modal de personalización de cookies */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-modal-header {
    background: #1e3a8a;
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 20px;
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-category {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    cursor: pointer;
}

.cookie-category-header h4 {
    margin: 0;
    font-size: 16px;
    color: #1e293b;
}

.cookie-category-body {
    padding: 16px;
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    border-top: 1px solid #e5e7eb;
}

.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: 0.3s;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: ;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: #22c55e;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background: #22c55e;
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Páginas legales */
.legal-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', sans-serif;
}

.legal-page h1 {
    color: #1e3a8a;
    border-bottom: 3px solid #1e3a8a;
    padding-bottom: 16px;
    margin-bottom: 32px;
}

.legal-page h2 {
    color: #1e40af;
    margin-top: 32px;
    margin-bottom: 16px;
}

.legal-page h3 {
    color: #3b82f6;
    margin-top: 24px;
}

.legal-page p, .legal-page li {
    line-height: 1.8;
    color: #374151;
}

.legal-page ul {
    padding-left: 24px;
}

.legal-page .highlight-box {
    background: #eff6ff;
    border-left: 4px solid #1e3a8a;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.legal-page .warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.legal-page table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.legal-page th, .legal-page td {
    border: 1px solid #e5e7eb;
    padding: 12px;
    text-align: left;
}

.legal-page th {
    background: #1e3a8a;
    color: white;
}

.legal-page tr:nth-child(even) {
    background: #f8fafc;
}

/* Footer legal */
.legal-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 20px;
    margin-top: 60px;
}

.legal-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
}

.legal-footer h4 {
    color: white;
    margin-bottom: 16px;
    font-size: 16px;
}

.legal-footer a {
    color: #94a3b8;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    transition: color 0.2s;
}

.legal-footer a:hover {
    color: #60a5fa;
}

.legal-footer-bottom {
    max-width: 1200px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid #334155;
    text-align: center;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
}
