/**
 * Cookie Consent Banner Styles
 * Mobile-first responsive design
 */

.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: var(--bg-primary, #1a1a2e);
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

.cookie-consent-banner.hide {
    transform: translateY(100%);
}

.cookie-consent-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

/* Header */
.cookie-consent-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cookie-icon {
    width: 24px;
    height: 24px;
    color: var(--primary, #76d7c4);
    flex-shrink: 0;
}

.cookie-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

/* Message */
.cookie-message {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary, #a0a0a0);
    margin: 0 0 8px 0;
}

.cookie-privacy-link {
    font-size: 12px;
    color: var(--primary, #76d7c4);
    text-decoration: none;
    display: inline-block;
    margin-bottom: 12px;
}

.cookie-privacy-link:hover {
    text-decoration: underline;
}

/* Details Toggle */
.cookie-details-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-muted, #888);
    font-size: 12px;
    padding: 8px 0;
    cursor: pointer;
    width: 100%;
    justify-content: center;
}

.cookie-details-toggle:hover {
    color: var(--text-primary, #ffffff);
}

.toggle-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

/* Details Section */
.cookie-details {
    background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
}

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

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

.cookie-category:first-child {
    padding-top: 0;
}

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

.cookie-category-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary, #ffffff);
}

.cookie-category-desc {
    font-size: 11px;
    color: var(--text-muted, #888);
    margin: 0;
    line-height: 1.4;
    padding-left: 44px;
}

.cookie-always-on {
    font-size: 10px;
    color: var(--primary, #76d7c4);
    background: rgba(118, 215, 196, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    flex-shrink: 0;
}

.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-color: var(--bg-muted, #333);
    transition: 0.2s;
    border-radius: 20px;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--primary, #76d7c4);
}

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

/* Buttons */
.cookie-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.cookie-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.cookie-btn-primary {
    background: var(--primary, #76d7c4);
    color: #1a1a2e;
}

.cookie-btn-primary:hover {
    background: var(--primary-dark, #5dc4b0);
}

.cookie-btn-primary:active {
    transform: scale(0.98);
}

.cookie-btn-secondary {
    background: transparent;
    color: var(--text-secondary, #a0a0a0);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
}

.cookie-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #ffffff);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .cookie-consent-content {
        padding: 14px;
    }

    .cookie-title {
        font-size: 15px;
    }

    .cookie-message {
        font-size: 12px;
    }

    .cookie-btn {
        padding: 11px 12px;
        font-size: 13px;
    }

    .cookie-category-desc {
        padding-left: 0;
        margin-top: 6px;
    }
}

/* Safe area for iOS */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .cookie-consent-content {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner {
        transition: none;
    }

    .toggle-arrow {
        transition: none;
    }
}
