﻿body.mc-locked {
    overflow: hidden !important;
    height: 100% !important;
    width: 100% !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
}

/* Overlay */
#mc-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26,26,24,0.65);
    z-index: 200000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    margin: 0;
    border: none;
    box-sizing: border-box;
}
#mc-overlay.mc-visible { display: flex; }

/* Banner card */
#mc-banner {
    background: #ffffff;
    border: 1px solid #c8c2b8;
    border-radius: 0.85rem;
    box-shadow: 0 24px 64px rgba(26,26,24,0.20), 0 4px 16px rgba(26,26,24,0.10);
    width: 100%;
    max-width: 820px;
    max-height: 82vh;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.875rem;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    float: none;
    clear: both;
}
#mc-banner::-webkit-scrollbar { width: 4px; }
#mc-banner::-webkit-scrollbar-track { background: transparent; }
#mc-banner::-webkit-scrollbar-thumb { background: #c8c2b8; border-radius: 2px; }

/* Top bar */
#mc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem 0.9rem;
    margin: 0;
    border: none;
    border-bottom: 1px solid #c8c2b8;
    gap: 1rem;
    box-sizing: border-box;
    float: none;
    clear: both;
    background: transparent;
}
#mc-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    float: none;
    clear: both;
}
#mc-heading svg {
    color: #1d4ed8;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    display: block;
    border: none;
    background: transparent;
}
#mc-heading h2,
#mc-heading .mc-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: #1a1a18;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
    text-align: left;
    float: none;
    clear: both;
}

/* Language switcher */
#mc-lang-wrap {
    display: flex;
    align-items: center;
    background: #e8e2d8;
    border: 1px solid #c8c2b8;
    border-radius: 2rem;
    padding: 0.2rem;
    margin: 0;
    gap: 0.2rem;
    flex-shrink: 0;
    box-sizing: border-box;
}
.mc-lang-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.25rem 0.65rem;
    margin: 0;
    border-radius: 2rem;
    border: none;
    background: transparent;
    color: #3a3530;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    box-sizing: border-box;
    text-transform: none;
    line-height: 1.4;
    float: none;
    text-decoration: none;
    width: auto;
}
.mc-lang-btn.mc-active {
    background: #ffffff;
    color: #1a1a18;
    box-shadow: 0 1px 4px rgba(26,26,24,0.12);
}
.mc-lang-btn:focus-visible { outline: 2px solid rgba(29,78,216,0.6); outline-offset: 1px; }

/* Intro paragraph */
#mc-intro {
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 0.845rem;
    line-height: 1.7;
    color: #2e2a26;
    border: none;
    background: transparent;
    box-sizing: border-box;
    float: none;
    clear: both;
    text-align: left;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}
#mc-intro a {
    color: #1d4ed8;
    font-weight: 500;
    text-underline-offset: 2px;
    text-decoration: underline;
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
}
#mc-intro a:focus-visible { outline: 2px solid rgba(29,78,216,0.6); outline-offset: 2px; border-radius: 2px; }

.mc-rule {
    height: 1px;
    background: #c8c2b8;
    margin: 0 1.5rem;
    padding: 0;
    border: none;
    display: block;
    float: none;
    clear: both;
}

/* Category list */
#mc-cats {
    padding: 0.85rem 1.5rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border: none;
    background: transparent;
    box-sizing: border-box;
    float: none;
    clear: both;
    list-style: none;
}
.mc-cat {
    border: 1px solid #c8c2b8;
    border-radius: 0.65rem;
    overflow: hidden;
    transition: border-color 0.18s;
    margin: 0;
    padding: 0;
    background: transparent;
    box-sizing: border-box;
    float: none;
    clear: both;
    list-style: none;
}
.mc-cat:focus-within { border-color: #1d4ed8; }
.mc-cat.mc-open { border-color: #1d4ed8; }

.mc-cat-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 1rem;
    margin: 0;
    background: #ffffff;
    border: none;
    width: 100%;
    text-align: left;
    font-family: 'Source Sans 3', sans-serif;
    cursor: pointer;
    box-sizing: border-box;
    float: none;
    clear: both;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: normal;
    font-size: 0.875rem;
    color: #1a1a18;
    border-radius: 0;
    outline: none;
    transition: background 0.15s;
}
.mc-cat-btn:hover {
    background: #f5f3ef;
}
.mc-cat-btn:focus-visible { outline: 2px solid #1d4ed8; outline-offset: -2px; border-radius: 0.55rem; }

.mc-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    display: inline-block;
}
.mc-cat-label {
    flex: 1;
    font-size: 0.845rem;
    font-weight: 600;
    color: #1a1a18;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.4;
}
.mc-always-on {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    background: #1d4ed8;
    border: 1px solid rgba(29,78,216,0.25);
    padding: 0.15rem 0.5rem;
    margin: 0;
    border-radius: 2rem;
    font-weight: 600;
    line-height: 1.4;
    display: inline-block;
    float: none;
}

/* Toggle switch */
.mc-tog-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    float: none;
}
.mc-tog-lbl {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    min-width: 1.8rem;
    text-align: right;
    color: #4a4540;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    line-height: 1.4;
    display: inline-block;
    float: none;
}
.mc-tog-lbl.mc-on { color: #1d4ed8; }

.mc-tog {
    position: relative;
    width: 2.2rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    display: inline-block;
    float: none;
}
.mc-tog input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
}
.mc-tog-track {
    position: absolute;
    inset: 0;
    border-radius: 2rem;
    background: #8a8480;
    cursor: pointer;
    transition: background 0.2s;
    margin: 0;
    padding: 0;
    border: none;
}
.mc-tog-track::after {
    content: '';
    position: absolute;
    top: 0.155rem;
    left: 0.155rem;
    width: 0.94rem;
    height: 0.94rem;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.22);
    transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1);
    margin: 0;
    padding: 0;
    border: none;
}
.mc-tog input:checked ~ .mc-tog-track { background: #1d4ed8; }
.mc-tog input:checked ~ .mc-tog-track::after { transform: translateX(0.95rem); }
.mc-tog input:disabled ~ .mc-tog-track { opacity: 0.45; cursor: default; }
.mc-tog input:focus-visible ~ .mc-tog-track { box-shadow: 0 0 0 3px rgba(29,78,216,0.4); }

/* Chevron */
.mc-chev {
    width: 1rem;
    height: 1rem;
    color: #4a4540;
    flex-shrink: 0;
    transition: transform 0.2s;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    display: block;
    float: none;
}
.mc-cat.mc-open .mc-chev { transform: rotate(180deg); }

/* Expanded body */
.mc-cat-body {
    display: none;
    border-top: 1px solid #c8c2b8;
    background: #fdfcfb;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    float: none;
    clear: both;
}
.mc-cat.mc-open .mc-cat-body { display: block; }

.mc-cat-desc {
    padding: 0.8rem 1rem 0.65rem;
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.65;
    color: #3a3530;
    border: none;
    background: transparent;
    box-sizing: border-box;
    float: none;
    clear: both;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    text-align: left;
}

/* Cookie table */
.mc-tbl-wrap {
    overflow-x: auto;
    padding: 0 1rem 1rem;
    margin: 0;
    border: none;
    background: transparent;
    box-sizing: border-box;
    float: none;
    clear: both;
}
table.mc-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.755rem;
    min-width: 460px;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-sizing: border-box;
    float: none;
    clear: both;
}
.mc-tbl thead tr {
    background: #e8e2d8;
    margin: 0;
    padding: 0;
    border: none;
}
.mc-tbl th {
    padding: 0.38rem 0.6rem;
    margin: 0;
    text-align: left;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #2e2a26;
    white-space: nowrap;
    border: none;
    background: transparent;
    line-height: 1.4;
    box-sizing: border-box;
    font-family: 'Source Sans 3', sans-serif;
    vertical-align: middle;
}
.mc-tbl th:first-child { border-radius: 0.35rem 0 0 0.35rem; }
.mc-tbl th:last-child  { border-radius: 0 0.35rem 0.35rem 0; }
.mc-tbl td {
    padding: 0.48rem 0.6rem;
    margin: 0;
    border: none;
    border-bottom: 1px solid #ddd8ce;
    vertical-align: top;
    line-height: 1.45;
    color: #2e2a26;
    background: transparent;
    box-sizing: border-box;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.755rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    text-align: left;
}
.mc-tbl tr:last-child td { border-bottom: none; }
.mc-tbl td:first-child {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: #1a1a18;
    white-space: nowrap;
    padding: 0.48rem 0.6rem;
    margin: 0;
}
.mc-tbl td small {
    color: #3a3530;
    font-size: 0.7rem;
    font-weight: 400;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    display: block;
    line-height: 1.4;
}

.mc-exp {
    display: inline-block;
    font-size: 0.62rem;
    background: #e8e2d8;
    border: 1px solid #c8c2b8;
    color: #2e2a26;
    padding: 0.1rem 0.4rem;
    margin: 0;
    border-radius: 2rem;
    white-space: nowrap;
    line-height: 1.4;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    float: none;
}

/* Action buttons */
#mc-actions {
    padding: 0.9rem 1.5rem 1.3rem;
    margin: 0;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 0.6rem;
    align-items: center !important;
    border: none;
    background: transparent;
    box-sizing: border-box;
    float: none;
    clear: both;
}
.mc-btn {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.58rem 1.15rem;
    margin: 0;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    letter-spacing: 0.01em;
    line-height: 1;
    transition: opacity 0.15s, transform 0.1s;
    box-sizing: border-box;
    text-transform: none;
    text-align: center;
    text-decoration: none;
    display: inline-block !important;
    float: none;
    clear: none;
    background: transparent;
    color: #1a1a18;
    outline: none;
    vertical-align: middle;
    white-space: nowrap;
    width: auto !important;
    flex: none !important;
}
.mc-btn:active { transform: scale(0.97); }
.mc-btn:focus-visible { outline: 2px solid rgba(29,78,216,0.6); outline-offset: 2px; }

.mc-btn-accept {
    background: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(29,78,216,0.28);
    border: none;
}
.mc-btn-accept:hover { background: #1a45c4; color: #ffffff; }

.mc-btn-save {
    background: #1a1a18;
    color: #ffffff;
    border: none;
}
.mc-btn-save:hover { background: #2e2a26; color: #ffffff; }

.mc-btn-reject {
    background: transparent;
    color: #2e2a26;
    border: 1px solid #8a8480;
}
.mc-btn-reject:hover { background: #e8e2d8; color: #1a1a18; }

/* Toast */
#mc-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: #1a1a18;
    color: #ffffff;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.8rem;
    font-weight: 400;
    padding: 0.6rem 1.2rem;
    margin: 0;
    border-radius: 2rem;
    border: none;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    z-index: 210000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
    line-height: 1.4;
    text-align: center;
    box-sizing: border-box;
    float: none;
    text-transform: none;
    letter-spacing: normal;
}
#mc-toast.mc-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 560px) {
    #mc-overlay { padding: 0; align-items: center; }
    #mc-banner  { border-radius: 0.85rem; max-height: 90vh; margin: 0 5px; }
    #mc-topbar, #mc-intro, #mc-cats, #mc-actions { padding-left: 1rem; padding-right: 1rem; }
    .mc-rule { margin: 0 1rem; }
    #mc-actions { flex-direction: column !important; align-items: stretch !important; }
    .mc-btn { text-align: center; width: 100% !important; }
}