/* ---- Utilities ---- */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* ---- Overlay ---- */
#cookie-prefs-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10998;
}

/* ---- Panel ---- */
#cookie-prefs-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 625px;
    max-width: 100vw;
    height: 100vh;
    background: #F3F3F0;
    z-index: 10999;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.18);
}

#cookie-prefs-panel.open {
    transform: translateX(0);
}

#cookie-prefs-overlay.open {
    display: block;
}

/* ---- Scroll wrapper ---- */
#cookie-prefs-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ---- Header ---- */
#cookie-prefs-header {
    position: relative;
    padding: 20px 24px 16px;
    background: #F3F3F0;
    flex-shrink: 0;
}

#cookie-prefs-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #000028;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#cookie-prefs-close:hover { opacity: 0.7; }
#cookie-prefs-close:focus { outline: 2px solid #000028; outline-offset: 2px; }

#cookie-prefs-title {
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 20.25px;
    line-height: 25.31px;
    color: #000028;
    margin: 0 32px 12px 0 !important;
}

#cookie-prefs-body {
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 22.5px;
    color: #000028;
    margin: 0 !important;
}

#cookie-prefs-notice-link {
    display: block;
    color: #007993;
    font-size: 15.75px;
    font-family: Arial, sans-serif;
    font-weight: 400;
    text-decoration: none;
    margin-top: 8px;
}

#cookie-prefs-notice-link:hover { text-decoration: underline; }

/* Force #F3F3F0 on every panel section — prevents page global white from bleeding in */
#cookie-prefs-panel *,
#cookie-prefs-panel *::before,
#cookie-prefs-panel *::after {
    box-sizing: border-box;
}

#cookie-prefs-header,
#cookie-prefs-tabs,
#cookie-prefs-footer {
    background: #F3F3F0;
}

#cookie-prefs-panel .cookie-prefs-tabpanel {
    background: #FFFFFF !important;
    flex: 1;
}

/* ---- Tabs ---- */
#cookie-prefs-tabs {
    display: flex;
    border-bottom: 1px solid #DDDDDD;
    padding: 0;
    position: sticky;
    top: 0;
    background: #F3F3F0;
    z-index: 1;
}

.cookie-prefs-tab {
    font-family: Arial, sans-serif;
    font-size: 18px;
    line-height: 22.5px;
    color: #000028;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 12px 16px 10px;
    cursor: pointer;
    font-weight: 400;
    margin-bottom: -1px;
    flex: 1;
    text-align: center;
}

.cookie-prefs-tab.active {
    font-weight: 700;
    border-bottom-color: #000028;
}

.cookie-prefs-tab:focus { outline: 2px solid #000028; outline-offset: -2px; }

/* ---- Tab Panel ---- */
.cookie-prefs-tabpanel {
    flex: 1;
    padding: 16px 24px;
    background: #F3F3F0;
}

/* ---- Category Rows ---- */
#cookie-prefs-panel .cookie-category-row {
    border: 1px solid #DDDDDD;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 10px;
    background: #F3F3F0 !important;
}

.cookie-category-header-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-category-name {
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 22.5px;
    color: #000028;
    flex: 1;
}

.cookie-category-desc {
    font-family: Arial, sans-serif;
    font-weight: 400;
    font-size: 15.75px;
    line-height: 20px;
    color: #000028;
    margin: 8px 0 0 0 !important;
}

.cookie-chevron-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.cookie-chevron-btn:focus { outline: 2px solid #000028; outline-offset: 2px; }

.cookie-chevron-btn[aria-expanded="true"] .cookie-chevron {
    transform: rotate(180deg);
}

.cookie-chevron {
    font-size: 20px;
    color: #000028;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

/* Expanded cookie items list */
.cpc-items-list {
    border-top: 1px solid #DDDDDD;
    margin-top: 8px;
}

.cpc-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #DDDDDD;
    gap: 8px;
}

.cpc-item-row:last-child { border-bottom: none; }

.cpc-item-name {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #000028;
    flex: 1;
    min-width: 0;
    word-break: break-all;
}

.cpc-item-info-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #000028;
    font-size: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.cpc-item-info-btn:focus { outline: 2px solid #000028; outline-offset: 2px; }

/* ---- Info Dialog ---- */
#cp-info-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: transparent;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 11000;
}

#cp-info-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11001;
    width: 560px;
    max-width: calc(100vw - 32px);
    max-height: 85vh;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

#cp-info-dialog[hidden] { display: none !important; }

#cp-info-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #DDDDDD;
    flex-shrink: 0;
}

#cp-info-title {
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #000028;
    margin: 0 !important;
    line-height: 1.3;
}

#cp-info-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #000028;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: 12px;
}

#cp-info-close:hover { color: #007993; }
#cp-info-close:focus { outline: 2px solid #000028; outline-offset: 2px; }

#cp-info-body {
    overflow-y: auto;
    flex: 1;
    background: #fff;
}

#cp-info-body .cps-detail-block,
#cp-info-body .cps-item-detail {
    background: #fff !important;
}

#cp-info-dialog-footer {
    padding: 16px 20px;
    border-top: 1px solid #DDDDDD;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

#cp-info-back {
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 15px;
    background: #007993;
    color: #fff;
    border: none;
    padding: 10px 32px;
    cursor: pointer;
}

#cp-info-back:hover { background: #005f74; }
#cp-info-back:focus { outline: 2px solid #000028; outline-offset: 2px; }

/* ---- Toggle Switch ---- */
.cookie-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.cookie-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}

.cookie-toggle-track {
    display: block;
    width: 48px;
    height: 24px;
    border-radius: 100px;
    background: #DDDDDD;
    position: relative;
    transition: background 0.2s;
}

.cookie-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}

.cookie-toggle input:checked + .cookie-toggle-track {
    background: #005159;
}

.cookie-toggle input:checked + .cookie-toggle-track::after {
    transform: translateX(24px);
}

.cookie-toggle.locked {
    cursor: not-allowed;
    opacity: 0.85;
}

.cookie-toggle input:focus + .cookie-toggle-track {
    outline: 2px solid #000028;
    outline-offset: 2px;
}

/* ---- Services tab ---- */
#cp-services-mount {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cps-item {
    border: 1px solid #DDDDDD;
    border-radius: 4px;
    background: #F3F3F0;
}

.cps-item-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    text-align: left;
    font-family: Arial, sans-serif;
    gap: 12px;
}

.cps-item-btn:focus { outline: 2px solid #000028; outline-offset: -2px; }

.cps-item-info {
    flex: 1;
    min-width: 0;
}

.cps-item-name {
    display: block;
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #000028;
    line-height: 1.4;
}

.cps-item-cat {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #666;
    line-height: 1.4;
    margin-top: 2px;
}

.cps-chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke: #000028;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.cps-item-btn[aria-expanded="true"] .cps-chevron {
    transform: rotate(180deg);
}

/* Detail blocks inside expanded service */
.cps-item-detail {
    border-top: 1px solid #DDDDDD;
}

.cps-detail-block {
    padding: 12px 16px;
    border-bottom: 1px solid #DDDDDD;
    font-family: Arial, sans-serif;
}

.cps-detail-block:last-child { border-bottom: none; }

.cps-detail-label {
    font-size: 12px;
    font-weight: 400;
    color: #888;
    margin-bottom: 3px;
}

.cps-detail-desc {
    font-size: 13px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 6px;
}

.cps-detail-content {
    font-size: 13px;
    color: #000028;
    line-height: 1.5;
}

.cps-detail-content p {
    margin: 0 0 3px 0 !important;
    font-size: 13px !important;
}

.cps-detail-content a {
    color: #007993;
    text-decoration: none;
}

.cps-detail-content a:hover { text-decoration: underline; }

.cps-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.cps-item-detail {
    background: #F3F3F0;
}

.cps-detail-block {
    background: #F3F3F0;
}

.cps-pill {
    display: inline-block;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: #000028;
    border: 1px solid #AAAAAA;
    padding: 3px 10px;
    line-height: 1.4;
    background: #F3F3F0;
}

/* ---- Footer ---- */
#cookie-prefs-footer {
    display: flex;
    gap: 16px;
    padding: 12px 24px;
    border-top: 1px solid #DDDDDD;
    flex-shrink: 0;
    background: #F3F3F0;
}

#cookie-prefs-footer button {
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 1.3;
    padding: 12px 16px;
    border-radius: 0;
    cursor: pointer;
    flex: 1;
    border: none;
}

#cookie-prefs-confirm {
    background: #F3F3F0;
    color: #007993;
    border: 1px solid #007993 !important;
}

#cookie-prefs-confirm:hover { background: #e8f4f5; }

#cookie-prefs-reject,
#cookie-prefs-allow {
    background: #007993;
    color: #fff;
}

#cookie-prefs-reject:hover,
#cookie-prefs-allow:hover { background: #005f74; }

#cookie-prefs-footer button:focus { outline: 2px solid #000028; outline-offset: 2px; }
