/**
 * RGPD / GDPR Compliance Styles
 * Abogadoz - Portal de Abogados de Espana
 */

/* ============================================
   Cookie Consent Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: #e2e8f0;
    z-index: 9999;
    padding: 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    transform: translateY(100%);
    transition: transform 0.4s ease;
    font-size: 0.9rem;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner .cookie-content {
    padding: 1.25rem 1.5rem;
}

.cookie-banner h5 {
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.cookie-banner p {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    color: #cbd5e1;
}

.cookie-banner a {
    color: #93c5fd;
    text-decoration: underline;
}

.cookie-banner a:hover {
    color: #bfdbfe;
}

/* Cookie toggle switches */
.cookie-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.cookie-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.08);
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
}

.cookie-option label {
    cursor: pointer;
    margin-bottom: 0;
    color: #e2e8f0;
}

.cookie-option input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #3b82f6;
    cursor: pointer;
}

.cookie-option input[type="checkbox"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-option .badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
}

/* Cookie buttons */
.cookie-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cookie-buttons .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-cookie-accept {
    background: #3b82f6;
    color: #fff;
    border: none;
}

.btn-cookie-accept:hover {
    background: #2563eb;
    color: #fff;
}

.btn-cookie-reject {
    background: transparent;
    color: #cbd5e1;
    border: 1px solid #475569;
}

.btn-cookie-reject:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.btn-cookie-settings {
    background: transparent;
    color: #93c5fd;
    border: 1px solid #3b82f6;
}

.btn-cookie-settings:hover {
    background: rgba(59,130,246,0.15);
    color: #bfdbfe;
}

.btn-cookie-save {
    background: #10b981;
    color: #fff;
    border: none;
}

.btn-cookie-save:hover {
    background: #059669;
    color: #fff;
}

/* Cookie settings panel */
.cookie-settings-panel {
    display: none;
    background: rgba(0,0,0,0.2);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.cookie-settings-panel.show {
    display: block;
}

.cookie-category {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category h6 {
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cookie-category p {
    font-size: 0.8rem;
    margin-bottom: 0;
    color: #94a3b8;
}

/* Floating cookie settings button */
.cookie-settings-trigger {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1e293b;
    color: #fff;
    border: 2px solid #3b82f6;
    cursor: pointer;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: background 0.2s ease;
}

.cookie-settings-trigger:hover {
    background: #334155;
}

.cookie-settings-trigger.show {
    display: flex;
}

/* ============================================
   RGPD Form Consent Checkboxes
   ============================================ */
.rgpd-consent {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.rgpd-consent .form-check {
    margin-bottom: 0.5rem;
}

.rgpd-consent .form-check:last-child {
    margin-bottom: 0;
}

.rgpd-consent .form-check-label {
    font-size: 0.85rem;
    color: #495057;
    line-height: 1.4;
}

.rgpd-consent .form-check-label a {
    color: #0d6efd;
    text-decoration: underline;
}

.rgpd-consent .form-check-input {
    margin-top: 0.2rem;
}

/* reCAPTCHA & third-party notice */
.rgpd-third-party-notice {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f1f3f5;
    border-radius: 0.25rem;
    line-height: 1.5;
}

.rgpd-third-party-notice a {
    color: #495057;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .cookie-banner .cookie-content {
        padding: 1rem;
    }

    .cookie-options {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-buttons .btn {
        width: 100%;
    }
}
