/* ============================
   COOKIE CONSENT MODAL STYLES
   ============================ */

.cookie-container {
    max-width: min(95vw, 480px);
    max-height: min(90vh, 700px);
}

.cookie-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    padding: var(--space-md);
    text-align: center;
    color: white;
    position: relative;
}

.cookie-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 15s linear infinite;
}

.cookie-emoji {
    display: block;
    font-size: clamp(2.5rem, 7vw, 3.5rem);
    margin-bottom: 0.5rem;
    animation: cookieBounce 2s ease-in-out infinite;
}

@keyframes cookieBounce {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.cookie-header h2 {
    font-size: clamp(1.3rem, 4vw, 1.6rem);
    margin: 0 0 0.25rem;
    color: white;
    position: relative;
    z-index: 1;
}

.cookie-header p {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    opacity: 0.95;
    margin: 0;
}

.cookie-body {
   padding: clamp(1.25rem, 3vw, 1.5rem);
   overflow: auto;
}

.cookie-message {
    text-align: center;
    margin-bottom: 1.5rem;
}

.cookie-message p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #6b7280;
    line-height: 1.5;
    margin: 0;
}

/* Cookie Types */
.cookie-types {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cookie-type {
    background: #f9fafb;
    border-radius: 12px;
    padding: clamp(0.875rem, 2vw, 1rem);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.cookie-type:hover {
    border-color: #f59e0b;
    background: #fffbeb;
}

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

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

.cookie-icon {
    font-size: 1.5rem;
    width: 32px;
    flex-shrink: 0;
}

.cookie-info h4 {
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    margin: 0 0 0.125rem;
    color: #111827;
}

.cookie-info p {
    font-size: clamp(0.75rem, 2vw, 0.85rem);
    color: #6b7280;
    margin: 0;
}

.cookie-badge {
    background: #10b981;
    color: white;
    padding: 0.25rem 0.625rem;
    border-radius: 20px;
    font-size: clamp(0.7rem, 2vw, 0.8rem);
    font-weight: 600;
    white-space: nowrap;
}

.cookie-badge.always-on {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* FIXED Cookie Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    cursor: pointer;
}

.cookie-toggle input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    opacity: 0;
    z-index: 1;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;  /* Light gray background */
    transition: all 0.3s ease;
    border-radius: 28px;
    border: 2px solid #fed7aa;  /* Faint orange outline */
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 2px;
    background-color: white;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Checked state - orange background */
.cookie-toggle input:checked + .toggle-slider {
    background-color: #f97316;  /* Orange background */
    border-color: #ea580c;  /* Darker orange border */
}

.cookie-toggle input:checked + .toggle-slider:before {
    transform: translateX(20px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hover effects */
.cookie-toggle:hover .toggle-slider {
    border-color: #fb923c;  /* Brighter orange on hover */
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.1);  /* Subtle glow */
}

.cookie-toggle input:checked:hover + .toggle-slider {
    background-color: #fb923c;  /* Lighter orange on hover */
    border-color: #f97316;
}

/* Focus effect for accessibility */
.cookie-toggle input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.2);
}

/* Smooth transitions */
.toggle-slider,
.toggle-slider:before {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-examples {
    margin-left: calc(32px + 0.75rem);
}

.cookie-examples small {
    font-size: clamp(0.75rem, 2vw, 0.8rem);
    color: #9ca3af;
    line-height: 1.4;
}

/* Privacy Link */
.cookie-privacy {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.cookie-privacy p {
    margin: 0;
    font-size: clamp(0.85rem, 2.5vw, 0.9rem);
    color: #6b7280;
}

.cookie-privacy a {
    color: #f59e0b;
    font-weight: 600;
    text-decoration: none;
}

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

/* Cookie Actions */
.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cookie-actions .btn {
    width: 100%;
    padding: clamp(0.875rem, 2.5vw, 1rem);
    font-size: clamp(0.9rem, 2.5vw, 0.95rem);
    border-radius: 12px;
}

.cookie-actions .btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.cookie-actions .btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #e5e7eb;
    font-weight: 600;
}

.cookie-actions .btn-ghost {
    background: transparent;
    color: #9ca3af;
    border: none;
    font-size: clamp(0.8rem, 2vw, 0.85rem);
    padding: 0.5rem;
}


/* FORCE Cookie Toggle Switch Styles with More Specific Selectors */
#cookieModal .cookie-toggle {
    position: relative !important;
    display: inline-block !important;
    width: 50px !important;
    height: 28px !important;
    cursor: pointer !important;
}

#cookieModal .cookie-toggle input[type="checkbox"] {
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    cursor: pointer !important;
    opacity: 0 !important;
    z-index: 2 !important;
}

#cookieModal .cookie-toggle .toggle-slider {
    position: absolute !important;
    cursor: pointer !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background-color: #e5e7eb !important;
    transition: all 0.3s ease !important;
    border-radius: 28px !important;
    border: 2px solid #fed7aa !important;
    display: block !important;
}

#cookieModal .cookie-toggle .toggle-slider:before {
    position: absolute !important;
    content: "" !important;
    height: 20px !important;
    width: 20px !important;
    left: 3px !important;
    bottom: 2px !important;
    background-color: white !important;
    transition: all 0.3s ease !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
    display: block !important;
}

/* Checked state */
#cookieModal .cookie-toggle input[type="checkbox"]:checked + .toggle-slider {
    background-color: #f97316 !important;
    border-color: #ea580c !important;
}

#cookieModal .cookie-toggle input[type="checkbox"]:checked + .toggle-slider:before {
    transform: translateX(20px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}
