/* Cookie Consent Banner Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #eaf4ff; /* soft blue accent */
    border-top: 1px solid #b6d7ff;
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(13, 38, 76, 0.12);
    font-size: 0.8rem; /* smaller base font */
}

/* Cookie consent overlay to block interaction */
.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    z-index: 999;
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
}

/* Hidden class for elements that should be hidden */
.hidden {
    display: none !important;
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 12px; /* even tighter padding */
    display: flex;
    flex-direction: row; /* single row layout */
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cookie-consent-text {
    margin-bottom: 0; /* zero to minimize height */
}

.cookie-consent-text h3 {
    display: none; /* hide heading to save space */
}

.cookie-consent-text p {
    margin: 0; /* tighter */
    color: #0b2845; /* darker for contrast on light blue */
    line-height: 1.3; /* slightly more to avoid visual clipping */
    white-space: normal; /* allow wrapping */
    overflow: visible; /* no clipping */
}

.cookie-consent-text ul {
    display: none; /* hide list to keep banner slim */
}

.cookie-consent-buttons {
    display: flex;
    gap: 6px; /* tighter gap */
    flex-wrap: wrap; /* allow wrapping on narrow widths */
}

/* Tighter buttons inside the banner */
#cookie-consent-banner .btn {
    padding: 5px 10px;
    font-size: 0.8rem;
    line-height: 1.1;
}

#cookie-consent-banner .btn-link {
    padding: 2px 6px;
    font-size: 0.78rem;
    color: #0b5ed7; /* ensure visible on blue background */
}

/* Cookie Settings Modal Styles */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cookie-settings-container {
    background-color: #fff;
    border-radius: 5px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

.cookie-settings-header h3 {
    margin: 0;
    color: #343a40;
}

.close-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
}

.cookie-settings-body {
    padding: 20px;
}

.cookie-category {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

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

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category-header h4 {
    margin: 0;
    color: #343a40;
}

.cookie-details {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.9em;
}

.cookie-details p {
    margin: 5px 0;
}

.cookie-settings-footer {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

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

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

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
    text-indent: -9999px; /* Hide any text that might be in the label */
    overflow: hidden; /* Ensure no text is visible */
    font-size: 0; /* Additional measure to hide text */
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: #007bff;
}

.toggle-switch input:checked + label:before {
    transform: translateX(26px);
}

.toggle-switch.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Non-blocking mode: no scroll locking required */
body.cookie-consent-open {
    overflow: auto;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .cookie-consent-text { margin-right: 12px; }
    /* Already single-row and compact by default */
}
