/* Cookie Consent Modal - Anthropic Style */
.cookie-consent-overlay {
    position: fixed;
    bottom: 24px;
    right: 24px;
    left: auto;
    max-width: 456px;
    z-index: 10000;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    pointer-events: none;
}

.cookie-consent-overlay.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-consent-modal {
    background: #141413;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
    color: #fff;
    line-height: 1.25em;
}

.cookie-consent-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.cookie-consent-description {
    font-size: 0.875rem;
    color: #e8e6dc;
    line-height: 1.25rem;
    margin: 0 0 24px 0;
}

.cookie-consent-description a {
    color: #a1a0a0;
    text-decoration: underline;
}

.cookie-consent-description a:hover {
    color: #fff;
}

/* Simple Options Layout */
.cookie-consent-simple-options {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    text-align: center;
}

.cookie-consent-customize {
    grid-column: span 2;
}

/* Detailed Options */
.cookie-consent-detailed-options {
    display: none;
}

.cookie-consent-detailed-options.show {
    display: block;
}

/* Cookie Category */
.cookie-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #3d3d3a;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
}

.cookie-category:last-of-type {
    margin-bottom: 32px;
}

.cookie-category-info h6 {
    color: #f0eee6;
    font-size: 0.75rem;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.cookie-category-info p {
    color: #b0aea5;
    font-size: 0.75rem;
    margin: 0;
}

.cookie-category-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-status {
    color: #f0eee6;
    font-size: 0.75rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #87867f;
    transition: .4s;
    border-radius: 24px;
}

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

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

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

input:disabled + .toggle-slider {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Buttons */
.cookie-consent-button {
    background: transparent;
    border: 1px solid #87867f;
    border-radius: 12px;
    color: #fff;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.cookie-consent-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cookie-consent-button.primary {
    background: #d97757;
    border: none;
}

.cookie-consent-button.primary:hover {
    background: #c86a4a;
}

.cookie-consent-button.full-width {
    width: 100%;
    text-align: center;
}

/* Mobile Responsive */
@media only screen and (max-width: 501px) {
    .cookie-consent-overlay {
        left: 8px !important;
        bottom: 8px !important;
        right: 8px !important;
        max-width: none;
    }
    
    .cookie-consent-modal {
        padding: 24px 16px 16px !important;
    }
    
    .cookie-consent-simple-options {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-template-rows: auto auto !important;
    }
    
    .cookie-consent-customize {
        grid-column: span 1 !important;
    }
    
    .cookie-consent-button span {
        display: none !important;
    }
}

/* Focus styles for accessibility */
.cookie-consent-button:focus,
.toggle-switch input:focus + .toggle-slider {
    outline: 2px solid #d97757;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-overlay,
    .toggle-slider,
    .toggle-slider:before,
    .cookie-consent-button {
        transition: none;
    }
}

/* Legacy banner styles for backward compatibility */
.cookie-consent-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 10000;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cookie-consent-banner.bottom {
    bottom: 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: none;
}

.cookie-consent-banner.top {
    top: 0;
    border-bottom: 1px solid #e5e7eb;
    border-top: none;
    transform: translateY(-100%);
}

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

.cookie-consent-banner.dark {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cookie-consent-text {
    flex: 1;
    min-width: 0;
}

.cookie-consent-text h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.cookie-consent-banner.dark .cookie-consent-text h3 {
    color: #f9fafb;
}

.cookie-consent-text p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.cookie-consent-banner.dark .cookie-consent-text p {
    color: #d1d5db;
}

.cookie-consent-text a {
    color: #3b82f6;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-consent-text a:hover {
    color: #2563eb;
}

.cookie-consent-banner.dark .cookie-consent-text a {
    color: #60a5fa;
}

.cookie-consent-banner.dark .cookie-consent-text a:hover {
    color: #93c5fd;
}

.cookie-consent-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-consent-actions button {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.btn-secondary {
    background: transparent;
    color: #6b7280;
    border-color: #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    color: #374151;
}

.cookie-consent-banner.dark .btn-secondary {
    color: #d1d5db;
    border-color: #4b5563;
}

.cookie-consent-banner.dark .btn-secondary:hover {
    background: #374151;
    color: #f9fafb;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
    overflow-y: auto;
}

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

.cookie-settings-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.cookie-settings-modal.show .cookie-settings-content {
    transform: scale(1);
}

.cookie-settings-header {
    padding: 24px 24px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
    margin-bottom: 24px;
}

.cookie-settings-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #374151;
}

.cookie-settings-body {
    padding: 0 24px;
    overflow-y: auto;
    flex: 1;
}

.cookie-settings-body > p {
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

.cookie-settings-footer {
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cookie-settings-footer button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        padding: 16px;
    }

    .cookie-consent-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .cookie-consent-actions button {
        flex: 1;
        min-width: 120px;
    }

    .cookie-settings-modal {
        padding: 10px;
    }

    .cookie-settings-content {
        max-height: 95vh;
    }

    .cookie-settings-header {
        padding: 16px 16px 0 16px;
        margin-bottom: 16px;
    }

    .cookie-settings-body {
        padding: 0 16px;
    }

    .cookie-settings-footer {
        padding: 16px;
        flex-direction: column;
    }

    .cookie-settings-footer button {
        width: 100%;
    }
}

/* Print styles */
@media print {
    .cookie-consent-overlay,
    .cookie-consent-banner,
    .cookie-settings-modal {
        display: none !important;
    }
}
