/**
 * ============================================
 * COOKIE SYSTEM STYLES - GDPR
 * Kamila Kondej Coaching
 * ============================================
 *
 * Minimalist and premium design that matches
 * the brand's visual identity.
 *
 * Brand Colors:
 * - Cream: #E8DCD1
 * - Terracotta: #A67563
 * - Dark: #1a1a1a
 */

/* ============================================
   OVERLAY AND MAIN CONTAINER
   ============================================ */

.cookie-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 1rem;

    /* Initial state - hidden */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   MODAL
   ============================================ */

.cookie-modal {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(166, 117, 99, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);

    /* Entry animation */
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cookie-overlay.show .cookie-modal {
    transform: scale(1) translateY(0);
}

/* ============================================
   MODAL CONTENT
   ============================================ */

.cookie-content {
    padding: 2rem;
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cookie-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #E8DCD1, #A67563);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.cookie-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.cookie-body {
    margin-bottom: 1.5rem;
}

.cookie-body p {
    color: #4a4a4a;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 0.75rem 0;
}

.cookie-legal {
    font-size: 0.8rem !important;
    color: #6b6b6b !important;
}

.cookie-legal a {
    color: #A67563;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-legal a:hover {
    color: #8B5D4C;
}

/* ============================================
   BUTTONS
   ============================================ */

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cookie-btn {
    padding: 0.875rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, #A67563, #8B5D4C);
    color: white;
    box-shadow: 0 4px 12px rgba(166, 117, 99, 0.3);
}

.cookie-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(166, 117, 99, 0.4);
}

.cookie-btn-primary:active {
    transform: translateY(0);
}

.cookie-btn-secondary {
    background: #E8DCD1;
    color: #1a1a1a;
}

.cookie-btn-secondary:hover {
    background: #ddd0c3;
}

.cookie-btn-link {
    background: transparent;
    color: #A67563;
    padding: 0.5rem;
}

.cookie-btn-link:hover {
    color: #8B5D4C;
    text-decoration: underline;
}

.cookie-btn-back {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #E8DCD1;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.cookie-btn-back:hover {
    background: #A67563;
    color: white;
}

/* ============================================
   PREFERENCES PANEL
   ============================================ */

.cookie-preferences-panel .cookie-header {
    padding-bottom: 1rem;
    border-bottom: 1px solid #E8DCD1;
}

.cookie-option {
    padding: 1.25rem 0;
    border-bottom: 1px solid #E8DCD1;
}

.cookie-option:last-of-type {
    border-bottom: none;
}

.cookie-option-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.cookie-option-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-option-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.cookie-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    background: #A67563;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-badge-optional {
    background: #E8DCD1;
    color: #1a1a1a;
}

.cookie-option-desc {
    font-size: 0.85rem;
    color: #6b6b6b;
    line-height: 1.5;
    margin: 0;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.cookie-toggle-wrapper {
    flex-shrink: 0;
}

.cookie-toggle {
    display: none;
}

.cookie-toggle-label {
    display: block;
    width: 48px;
    height: 26px;
    background: #d1d5db;
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cookie-toggle-label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.cookie-toggle:checked + .cookie-toggle-label {
    background: #A67563;
}

.cookie-toggle:checked + .cookie-toggle-label::after {
    transform: translateX(22px);
}

.cookie-toggle-label.disabled {
    background: #A67563;
    opacity: 0.7;
    cursor: not-allowed;
}

.cookie-toggle-label.disabled::after {
    transform: translateX(22px);
}

/* ============================================
   EXPANDABLE DETAILS
   ============================================ */

.cookie-details {
    margin-top: 0.75rem;
}

.cookie-details summary {
    font-size: 0.8rem;
    color: #A67563;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cookie-details summary:hover {
    color: #8B5D4C;
}

.cookie-details ul {
    margin: 0.75rem 0 0 0;
    padding-left: 1.25rem;
    font-size: 0.8rem;
    color: #6b6b6b;
}

.cookie-details li {
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

.cookie-details strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */

.cookie-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a1a;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cookie-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .cookie-overlay {
        padding: 0.75rem;
        align-items: flex-end;
    }

    .cookie-modal {
        border-radius: 1.5rem 1.5rem 0 0;
        max-height: 85vh;
    }

    .cookie-content {
        padding: 1.5rem;
    }

    .cookie-header h2 {
        font-size: 1.1rem;
    }

    .cookie-icon {
        width: 40px;
        height: 40px;
    }

    .cookie-icon svg {
        width: 24px;
        height: 24px;
    }

    .cookie-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }

    .cookie-option-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .cookie-toggle-wrapper {
        align-self: flex-end;
        margin-top: -2rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.cookie-btn:focus,
.cookie-toggle-label:focus-visible,
.cookie-details summary:focus-visible {
    outline: 2px solid #A67563;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .cookie-overlay,
    .cookie-modal,
    .cookie-btn,
    .cookie-toggle-label,
    .cookie-toggle-label::after,
    .cookie-notification {
        transition: none;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

.cookie-modal::-webkit-scrollbar {
    width: 6px;
}

.cookie-modal::-webkit-scrollbar-track {
    background: #E8DCD1;
    border-radius: 3px;
}

.cookie-modal::-webkit-scrollbar-thumb {
    background: #A67563;
    border-radius: 3px;
}

.cookie-modal::-webkit-scrollbar-thumb:hover {
    background: #8B5D4C;
}
