/**
 * Cookie Consent Banner Styles - LGPD (Brazil) Compliance
 *
 * Design requirements:
 * - Accept/Reject/Customize buttons have EQUAL visual weight (no dark patterns)
 * - High contrast, WCAG-compliant touch targets (min 48px)
 * - Responsive, accessible, keyboard navigable
 */
.cookie-consent-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); z-index: 999999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.cookie-consent-overlay.cookie-consent-visible { opacity: 1; }

.cookie-consent-banner {
    background: #fff; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 660px; width: 90%; max-height: 85vh; overflow-y: auto;
    margin: 20px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px; line-height: 1.6; color: #333;
}
.cookie-consent-banner-inner { padding: 28px 32px; }

.cookie-consent-header { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #e9ecef; }
.cookie-consent-title { font-size: 20px; font-weight: 700; color: #1a1a1a; margin: 0; }

.cookie-consent-body { margin-bottom: 20px; }
.cookie-consent-text { font-size: 14px; color: #495057; margin: 0 0 16px 0; line-height: 1.7; }

.cookie-consent-info { margin-bottom: 16px; }
.cookie-consent-detail { margin-bottom: 6px; }
.cookie-consent-detail summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #0066cc; padding: 6px 0; }
.cookie-consent-detail summary:hover { color: #004c99; text-decoration: underline; }
.cookie-consent-detail p { font-size: 13px; color: #6c757d; margin: 4px 0 4px 16px; line-height: 1.6; }

/* Category toggles */
.cookie-consent-categories { border-top: 1px solid #e9ecef; padding-top: 16px; margin-top: 12px; }
.cookie-consent-category { padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.cookie-consent-category:last-child { border-bottom: none; }
.cookie-consent-category-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cookie-consent-category-title { font-weight: 600; font-size: 14px; color: #1a1a1a; flex: 1; }
.cookie-consent-category-desc { font-size: 13px; color: #6c757d; margin: 4px 0 0 0; }
.cookie-consent-category-vendors { font-size: 12px; color: #999; margin: 2px 0 0 0; }

/* Toggle switches */
.cookie-consent-toggle { display: inline-flex; align-items: center; flex-shrink: 0; }
.cookie-consent-toggle input[type="checkbox"] {
    position: relative; width: 44px; height: 24px; -webkit-appearance: none; appearance: none;
    background: #ced4da; border-radius: 12px; cursor: pointer; transition: background 0.2s; outline: none; margin-right: 8px;
}
.cookie-consent-toggle input[type="checkbox"]:checked { background: #28a745; }
.cookie-consent-toggle input[type="checkbox"]::before {
    content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
    top: 2px; left: 2px; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cookie-consent-toggle input[type="checkbox"]:checked::before { transform: translateX(20px); }
.cookie-consent-toggle input[type="checkbox"]:disabled { background: #6c757d; cursor: not-allowed; opacity: 0.7; }
.cookie-consent-toggle label { font-size: 12px; color: #6c757d; cursor: pointer; user-select: none; }
.cookie-consent-toggle-required label { color: #6c757d; font-style: italic; }

/* Footer */
.cookie-consent-footer { border-top: 2px solid #e9ecef; padding-top: 16px; }
.cookie-consent-links { margin-bottom: 12px; font-size: 13px; color: #6c757d; line-height: 1.6; }
.cookie-consent-withdraw { margin: 0 0 4px 0; font-size: 12px; color: #6c757d; font-style: italic; }
.cookie-consent-link { color: #0066cc; text-decoration: underline; font-weight: 600; }
.cookie-consent-link:hover { color: #004c99; }

/*
 * BUTTONS - CRITICAL FOR LGPD:
 * Accept/Reject/Customize MUST have equal visual weight.
 * Reject MUST NOT be smaller, lighter, or harder to find.
 */
.cookie-consent-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.cookie-consent-save-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

.cookie-consent-btn {
    flex: 1; min-width: 140px; padding: 12px 20px; font-size: 14px; font-weight: 600;
    text-align: center; border: 2px solid transparent; border-radius: 6px; cursor: pointer;
    min-height: 48px; white-space: nowrap; transition: all 0.2s;
}
.cookie-consent-btn:focus { box-shadow: 0 0 0 3px rgba(0,102,204,0.4); }

.cookie-consent-btn-accept { background: #28a745; color: #fff; border-color: #28a745; }
.cookie-consent-btn-accept:hover { background: #218838; border-color: #1e7e34; }

.cookie-consent-btn-reject { background: #dc3545; color: #fff; border-color: #dc3545; }
.cookie-consent-btn-reject:hover { background: #c82333; border-color: #bd2130; }

.cookie-consent-btn-customize { background: #fff; color: #333; border-color: #adb5bd; }
.cookie-consent-btn-customize:hover { background: #f8f9fa; border-color: #6c757d; }

.cookie-consent-btn-save { background: #0066cc; color: #fff; border-color: #0066cc; }
.cookie-consent-btn-save:hover { background: #004c99; }

.cookie-consent-btn-close { background: #fff; color: #6c757d; border-color: #dee2e6; }
.cookie-consent-btn-close:hover { background: #f8f9fa; color: #333; }

/* Footer permanent link */
.cookie-settings-footer-link {
    display: inline-flex; align-items: center; gap: 4px;
    color: #0066cc; text-decoration: underline; cursor: pointer; font-size: 14px; font-weight: 500;
}
.cookie-settings-footer-link:hover { color: #004c99; text-decoration: none; }

/* Responsive */
@media (max-width: 600px) {
    .cookie-consent-banner { width: 95%; max-height: 90vh; margin: 10px; }
    .cookie-consent-banner-inner { padding: 20px 16px; }
    .cookie-consent-title { font-size: 18px; }
    .cookie-consent-buttons { flex-direction: column; gap: 8px; }
    .cookie-consent-btn { min-width: 100%; flex: none; }
    .cookie-consent-save-row { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent-overlay, .cookie-consent-toggle input[type="checkbox"],
    .cookie-consent-toggle input[type="checkbox"]::before { transition: none; }
}