/**
 * Cookie Consent Styles (Without Tailwind CSS)
 * Google Consent Mode v2 Compatible
 */

/* ======================
   Utility Classes
   ====================== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ======================
   Cookie Banner
   ====================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    padding: 0.5rem;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.cookie-banner-card {
    background: #fafbfc;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
    padding: 1.5rem;
}

.cookie-banner-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
}

.cookie-banner-description {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.625;
}

.cookie-banner-description a {
    color: #A6BF3B;
    text-decoration: underline;
}

.cookie-banner-description a:hover {
    color: #8fa832;
}

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

/* ======================
   Buttons
   ====================== */
.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    text-align: center;
    line-height: 1.5;
}

.cookie-btn:focus {
    outline: 2px solid #A6BF3B;
    outline-offset: 2px;
}

.cookie-btn-primary {
    background: #A6BF3B;
    color: #ffffff;
    font-weight: 600;
}

.cookie-btn-primary:hover {
    background: #8fa832;
    box-shadow: 0 2px 8px rgba(166, 191, 59, 0.3);
}

.cookie-btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.cookie-btn-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ======================
   Cookie Modal
   ====================== */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.cookie-modal-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    width: 100%;
}

.cookie-modal-container {
    position: relative;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 48rem;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.cookie-modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.cookie-modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.cookie-modal-close:hover {
    background: #f9fafb;
    color: #374151;
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-description {
    margin: 0 0 24px 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ======================
   Cookie Category
   ====================== */
.cookie-category {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

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

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

.cookie-category-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-category-title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.cookie-category-description {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

/* ======================
   Cookie Badge
   ====================== */
.cookie-badge {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.cookie-badge-always-on {
    background: #f0f7e0;
    color: #5a7221;
    border: 1px solid #d4e5a8;
}

/* ======================
   Toggle Switch
   ====================== */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    cursor: pointer;
}

.cookie-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    border-radius: 12px;
    transition: background-color 0.3s;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.cookie-toggle-input:checked + .cookie-toggle-slider {
    background-color: #A6BF3B;
}

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

.cookie-toggle-input:focus + .cookie-toggle-slider {
    box-shadow: 0 0 0 2px rgba(166, 191, 59, 0.3);
}

/* ======================
   Modal Footer
   ====================== */
.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: #fafbfc;
}

/* ======================
   Responsive Design
   ====================== */
@media (min-width: 640px) {
    .cookie-banner {
        padding: 1.25rem;
    }

    .cookie-banner-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .cookie-banner-actions {
        flex-direction: row;
        flex-shrink: 0;
    }
}

@media (max-width: 639px) {
    .cookie-modal-container {
        max-height: 100vh;
        border-radius: 0;
    }

    .cookie-modal-footer {
        flex-direction: column-reverse;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-banner-actions .cookie-btn {
        width: 100%;
    }

    .cookie-category-header {
        flex-wrap: wrap;
    }
}

/* ======================
   Print Styles
   ====================== */
@media print {
    .cookie-banner,
    .cookie-modal {
        display: none !important;
    }
}


/* ======================
   Accessibility
   ====================== */
button:focus-visible {
    outline: 2px solid #A6BF3B;
    outline-offset: 2px;
}

/* Ensure proper contrast */
@media (prefers-contrast: high) {
    .cookie-banner-card {
        border-width: 2px;
    }

    .cookie-btn {
        border-width: 2px;
    }

    .cookie-toggle-slider {
        border: 2px solid currentColor;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ======================
   Dark Mode Support
   ====================== */
/* @media (prefers-color-scheme: dark) {
    .cookie-banner-card {
        background: #1f2937;
        border-color: #374151;
    }

    .cookie-banner-title {
        color: #f9fafb;
    }

    .cookie-banner-description {
        color: #d1d5db;
    }

    .cookie-modal-container {
        background: #1f2937;
    }

    .cookie-modal-header {
        border-bottom-color: #374151;
    }

    .cookie-modal-title {
        color: #f9fafb;
    }

    .cookie-modal-close {
        color: #d1d5db;
    }

    .cookie-modal-close:hover {
        background: #374151;
        color: #f9fafb;
    }

    .cookie-modal-description {
        color: #d1d5db;
    }

    .cookie-category {
        border-bottom-color: #374151;
    }

    .cookie-category-title {
        color: #f9fafb;
    }

    .cookie-category-description {
        color: #d1d5db;
    }

    .cookie-modal-footer {
        border-top-color: #374151;
        background: #111827;
    }

    .cookie-btn-secondary {
        background: #374151;
        color: #f9fafb;
        border-color: #4b5563;
    }

    .cookie-btn-secondary:hover {
        background: #4b5563;
    }
} */
