/* Cookie Consent Banner Styles */

.cookie-consent-banner {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.98);
    color: #213547;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    display: none;
    animation: slideDown 0.3s ease-out;
    backdrop-filter: blur(10px);
    font-size: 14px; /* adjust this to scale consent banner global font size */
    border-bottom: 1px solid #e0e0e0;
}

.cookie-consent-banner.show {
    display: block;
}

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

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-consent-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-consent-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cookie-icon {
    display: none;
}

.cookie-consent-title {
    font-size: 0.8em;
    font-weight: 600;
    margin: 0px;
    margin-bottom: 4px;
    color: #213547;
}

.cookie-consent-text {
    font-size: 0.8em;
    line-height: 1.5;
    color: #404040;
    margin: 0;
}

.cookie-consent-text a {
    color: #646cff;
    text-decoration: underline;
}

.cookie-consent-text a:hover {
    color: #535bf2;
}

.cookie-consent-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    width: 100%;
}

.cookie-btn {
    padding: 0.4em 1em;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 0.8em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    white-space: nowrap;
}

.cookie-btn-primary {
    background-color: #000;
    color: white;
    border-color: #000;
}

.cookie-btn-primary:hover {
    background-color: #404040;
}

.cookie-btn-secondary {
    background-color: #fff;
    color: #213547;
    border-color: #ccc;
}

.cookie-btn-secondary:hover {
    background-color: #e0e0e0;
}

.cookie-btn-text {
    background-color: transparent;
    color: #606060;
    border: none;
}

.cookie-btn-text:hover {
    color: #213547;
    background-color: rgba(0, 0, 0, 0.05);
}

.cookie-btn:focus,
.cookie-btn:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Cookie Settings Modal */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(5px);
}

.cookie-settings-modal.show {
    display: flex;
}

.cookie-settings-content {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    max-width: 350px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

.cookie-settings-title {
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
    color: #213547;
}

.cookie-settings-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #606060;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.cookie-settings-close:hover {
    color: #213547;
    background-color: rgba(0, 0, 0, 0.05);
}

.cookie-option {
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-option-title {
    font-size: 0.8em;
    font-weight: 600;
    color: #213547;
    margin: 0;
}

.cookie-option-description {
    font-size: 0.8em;
    color: #606060;
    line-height: 1.4;
    margin: 0;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    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: #d0d0d0;
    transition: 0.3s;
    border-radius: 28px;
}

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

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

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

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

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

.cookie-settings-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 0.75rem;
    }

    .cookie-settings-content {
        padding: 1rem;
        margin: auto;
        max-width: 90%;
    }

    .cookie-settings-title {
        font-size: 1em;
    }

    .cookie-toggle {
        width: 36px;
        height: 20px;
    }

    .cookie-toggle-slider:before {
        height: 14px;
        width: 14px;
        left: 3px;
        bottom: 3px;
    }

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

@media (min-width: 769px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-consent-buttons {
        margin-top: 0.75rem;
    }
}
