/* ============================================
   COOKIE CONSENT STYLES
   Dok View - GDPR Cookie Banner & Popup
   ============================================ */

/* Cookie Banner - Fixed at bottom */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 1rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: 'Montserrat', sans-serif;
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-banner-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .cookie-banner {
        padding: 1.5rem 2rem;
    }
    
    .cookie-banner-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
    }
}

.cookie-banner-text {
    color: #9CA3AF;
    font-size: 0.875rem;
    line-height: 1.6;
    flex: 1;
}

.cookie-banner-text a {
    color: #D4B483;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.cookie-banner-text a:hover {
    color: #E8DCCA;
}

.cookie-banner-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .cookie-banner-buttons {
        flex-direction: row;
        gap: 0.75rem;
    }
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px;
    text-align: center;
    white-space: nowrap;
}

.cookie-btn-primary {
    background-color: #D4B483;
    color: #000;
}

.cookie-btn-primary:hover {
    background-color: #8C7350;
    color: #fff;
}

.cookie-btn-secondary {
    background-color: transparent;
    color: #9CA3AF;
    border: 1px solid #4B5563;
}

.cookie-btn-secondary:hover {
    background-color: #1F2937;
    color: #fff;
    border-color: #6B7280;
}

.cookie-btn-link {
    background: transparent;
    color: #D4B483;
    padding: 0.75rem 1rem;
    text-decoration: underline;
}

.cookie-btn-link:hover {
    color: #E8DCCA;
}

/* Cookie Popup Overlay */
.cookie-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.cookie-popup-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.cookie-popup {
    background: #fff;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-popup-overlay.visible .cookie-popup {
    transform: scale(1) translateY(0);
}

.cookie-popup-header {
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}

.cookie-popup-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.cookie-popup-description {
    font-size: 0.875rem;
    color: #6B7280;
    line-height: 1.6;
    margin: 0;
}

.cookie-popup-description a {
    color: #D4B483;
    text-decoration: underline;
}

.cookie-popup-description a:hover {
    color: #8C7350;
}

.cookie-popup-body {
    padding: 1.5rem;
}

/* Cookie Category Section */
.cookie-category {
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #F9FAFB;
    gap: 1rem;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.25rem 0;
}

.cookie-category-count {
    font-size: 0.75rem;
    color: #6B7280;
}

.cookie-category-status {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #059669;
    background: #D1FAE5;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    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: #D1D5DB;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #D4B483;
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(20px);
}

.cookie-toggle input:focus + .cookie-toggle-slider {
    box-shadow: 0 0 0 2px rgba(212, 180, 131, 0.3);
}

/* Cookie Details (Collapsible) */
.cookie-details-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
    color: #D4B483;
    cursor: pointer;
    background: transparent;
    border: none;
    border-top: 1px solid #E5E7EB;
    width: 100%;
    text-align: left;
    transition: background 0.2s ease;
}

.cookie-details-toggle:hover {
    background: #F9FAFB;
}

.cookie-details-toggle svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.cookie-details-toggle.open svg {
    transform: rotate(180deg);
}

.cookie-details-content {
    display: none;
    padding: 0 1.25rem 1rem;
}

.cookie-details-content.open {
    display: block;
}

/* Cookie Table */
.cookie-table {
    width: 100%;
    font-size: 0.75rem;
    border-collapse: collapse;
}

.cookie-table th {
    text-align: left;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.5rem 0.5rem 0;
    border-bottom: 1px solid #E5E7EB;
}

.cookie-table td {
    padding: 0.5rem 0.5rem 0.5rem 0;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
}

.cookie-table tr:last-child td {
    border-bottom: none;
}

/* Popup Footer */
.cookie-popup-footer {
    padding: 1.5rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #F9FAFB;
}

@media (min-width: 480px) {
    .cookie-popup-footer {
        flex-direction: row;
        justify-content: flex-end;
    }
}

.cookie-popup-footer .cookie-btn {
    flex: 1;
}

@media (min-width: 480px) {
    .cookie-popup-footer .cookie-btn {
        flex: none;
    }
}

/* Close button */
.cookie-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    transition: color 0.2s ease;
}

.cookie-popup-close:hover {
    color: #111827;
}

/* Scrollbar styling for popup */
.cookie-popup::-webkit-scrollbar {
    width: 6px;
}

.cookie-popup::-webkit-scrollbar-track {
    background: #F3F4F6;
}

.cookie-popup::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.cookie-popup::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .cookie-popup {
        max-height: 85vh;
    }
    
    .cookie-popup-header,
    .cookie-popup-body,
    .cookie-popup-footer {
        padding: 1rem;
    }
    
    .cookie-category-header {
        flex-wrap: wrap;
    }
    
    .cookie-table {
        font-size: 0.6875rem;
    }
}
