/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f4f4f4;
    /* Neutral light grey */
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    display: none;
    /* Hidden by default until JS shows it */
}

.cookie-banner.show {
    transform: translateY(0);
    display: block;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .cookie-banner-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-banner-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cookie-text h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.cookie-text p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary, #4b5563);
    line-height: 1.4;
}

.cookie-link {
    color: var(--primary-color, #2563eb);
    text-decoration: underline;
    cursor: pointer;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

/* Enhanced Button Styles */
.cookie-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    /* Increased padding for larger click area */
    font-size: 0.95rem;
    /* Slightly larger text */
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    white-space: nowrap;
    position: relative;
}

.cookie-btn:active {
    transform: translateY(1px);
}

.cookie-btn-sm {
    padding: 0.625rem 1.25rem;
    /* Medium size (was small) */
    font-size: 0.875rem;
}

.cookie-btn-primary {
    background-color: var(--primary-color, #2563eb);
    color: white;
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.cookie-btn-primary:hover {
    background-color: var(--primary-hover, #1d4ed8);
    border-color: var(--primary-hover, #1d4ed8);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.cookie-btn-secondary {
    background-color: white;
    color: var(--text-primary, #1f2937);
    border-color: var(--border-color, #d1d5db);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cookie-btn-secondary:hover {
    background-color: #f4f4f4;
    /* Neutral grey hover */
    border-color: var(--text-secondary, #9ca3af);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cookie-btn-outline {
    background-color: transparent;
    color: var(--text-secondary, #4b5563);
    border: 1px solid #d1d5db;
    /* Visible border to look like a button */
}

.cookie-btn-outline:hover {
    background-color: #f4f4f4;
    color: var(--text-primary, #1f2937);
    border-color: #9ca3af;
}

/* Cookie Modal Styles */
.cookie-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    padding: 1rem;
}

.cookie-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background-color: var(--surface-color, #ffffff);
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-modal-header h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.cookie-modal-header p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary, #9ca3af);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary, #1f2937);
    background-color: rgba(0, 0, 0, 0.05);
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
}

.cookie-category {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 0.5rem;
    padding: 1rem;
}

.cookie-category-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: .4s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.cookie-slider {
    background-color: var(--primary-color, #2563eb);
}

input:focus+.cookie-slider {
    box-shadow: 0 0 1px var(--primary-color, #2563eb);
}

input:checked+.cookie-slider:before {
    transform: translateX(20px);
}

input:disabled+.cookie-slider {
    background-color: #d1d5db;
    cursor: not-allowed;
}

input:checked:disabled+.cookie-slider {
    background-color: #93c5fd;
}

.cookie-category-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #1f2937);
}

.cookie-category-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
    line-height: 1.4;
}

.cookie-additional-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    font-size: 0.875rem;
    color: var(--text-secondary, #6b7280);
}

.cookie-additional-info p {
    margin: 0.5rem 0;
}

.cookie-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: var(--surface-color, #f9fafb);
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

@media (min-width: 640px) {
    .cookie-modal-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.cookie-actions-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Dark mode support */
[data-theme="dark"] .cookie-banner {
    background-color: #222222;
    /* Neutral dark grey */
    border-top: 1px solid #374151;
}

[data-theme="dark"] .cookie-modal-content {
    background-color: #222222;
    border-color: #374151;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .cookie-btn-secondary {
    background-color: #222222;
    color: #f4f4f4;
    border-color: #4b5563;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .cookie-btn-secondary:hover {
    background-color: #333333;
    border-color: #6b7280;
}

[data-theme="dark"] .cookie-modal-footer {
    background-color: #333333;
    border-color: #374151;
}

[data-theme="dark"] .cookie-slider {
    background-color: #4b5563;
}

[data-theme="dark"] input:disabled+.cookie-slider {
    background-color: #374151;
}