/**
 * Cathedral DHO - Cookie Consent Bar Styles
 * GDPR-compliant cookie consent UI
 */

/* Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

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

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

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

.cookie-consent-text h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
}

.cookie-consent-text p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary, #666);
    line-height: 1.5;
}

.cookie-consent-text a {
    color: var(--primary-color, #0066cc);
    text-decoration: none;
}

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

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

/* Buttons */
.cookie-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: var(--primary-color, #0066cc);
    color: white;
}

.cookie-btn-primary:hover {
    background: var(--primary-hover, #0055aa);
}

.cookie-btn-secondary {
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-primary, #1a1a1a);
}

.cookie-btn-secondary:hover {
    background: var(--border-color, #e5e5e5);
}

.cookie-btn-outline {
    background: transparent;
    color: var(--text-secondary, #666);
    border: 1px solid var(--border-color, #e5e5e5);
}

.cookie-btn-outline:hover {
    background: var(--bg-secondary, #f5f5f5);
    border-color: var(--text-secondary, #666);
}

/* Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.cookie-settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.cookie-settings-container {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 560px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.cookie-settings-modal.visible .cookie-settings-container {
    transform: translateY(0);
}

.cookie-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
}

.cookie-settings-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.cookie-settings-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 8px;
    font-size: 24px;
    line-height: 1;
    color: var(--text-secondary, #666);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-settings-close:hover {
    background: var(--border-color, #e5e5e5);
}

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

.cookie-settings-body > p {
    margin: 0 0 24px 0;
    font-size: 14px;
    color: var(--text-secondary, #666);
    line-height: 1.5;
}

/* Cookie Category */
.cookie-category {
    border: 1px solid var(--border-color, #e5e5e5);
    border-radius: 12px;
    margin-bottom: 12px;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category-header {
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary, #1a1a1a);
}

.cookie-category-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary, #666);
    line-height: 1.4;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    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: var(--border-color, #e5e5e5);
    border-radius: 14px;
    transition: 0.3s;
}

.cookie-toggle-slider::before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--primary-color, #0066cc);
}

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

.cookie-toggle.disabled .cookie-toggle-slider {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Settings Footer */
.cookie-settings-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color, #e5e5e5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary, #f5f5f5);
}

.cookie-link {
    color: var(--text-secondary, #666);
    text-decoration: none;
    font-size: 14px;
}

.cookie-link:hover {
    text-decoration: underline;
}

.cookie-settings-buttons {
    display: flex;
    gap: 12px;
}

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

    .cookie-consent-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-settings-container {
        max-width: none;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

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

    .cookie-settings-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-settings-buttons .cookie-btn {
        width: 100%;
    }
}
