/* Module styles are scoped to consent UI; the account footer link uses the theme. */
#tms-cc-root .is-hidden,
#tms-cc-modal .is-hidden { display: none; }
#tms-cc-root .tms-cc-fallback { clear: both; padding: 12px 15px; }

/* ===== Cookie banner ===== */
#tms-cc.tms-cc {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    padding: 12px;
    background: rgba(0,0,0,0.90);
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
}

#tms-cc.is-hidden { display: none; }

#tms-cc .tms-cc-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

#tms-cc .tms-cc-title { font-weight: 700; margin-bottom: 4px; }
#tms-cc .tms-cc-desc { margin: 0; opacity: 0.95; max-width: 780px; }

#tms-cc .tms-cc-links { margin-top: 6px; opacity: 0.95; }
#tms-cc .tms-cc-links a { color: #fff; text-decoration: underline; }
#tms-cc .tms-cc-sep { padding: 0 8px; opacity: 0.7; }

#tms-cc .tms-cc-actions { display: flex; gap: 10px; align-items: center; }

#tms-cc .tms-cc-btn {
    border: 1px solid rgba(255,255,255,0.4);
    background: transparent;
    color: #fff;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
}

#tms-cc .tms-cc-btn.primary {
    background: #ffffff;
    color: #000;
    border-color: #ffffff;
}

/* ===== Modal ===== */
#tms-cc-modal.tms-cc-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

#tms-cc-modal.is-hidden { display: none; }

#tms-cc-modal .tms-cc-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
}

#tms-cc-modal .tms-cc-dialog {
    position: relative;
    max-width: 760px;
    margin: 6vh auto 0 auto;
    background: #fff;
    color: #000;
    border-radius: 8px;
    padding: 18px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

#tms-cc-modal .tms-cc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid rgba(0,0,0,0.08);
}

#tms-cc-modal .tms-cc-row:first-of-type { border-top: 0; }

#tms-cc-modal .tms-cc-row-text p { margin: 6px 0 0 0; color: rgba(0,0,0,0.75); }
#tms-cc-modal label { display: block; font-weight: 700; margin: 0; }
#tms-cc-modal h2 { margin: 0 0 12px; font-size: 24px; }
#tms-cc-modal .tms-cc-links a { color: #333; text-decoration: underline; }
#tms-cc-modal .tms-cc-storage-warning { padding: 10px; background: #fff4ce; }
#tms-cc-modal .tms-cc-toggle { flex-shrink: 0; }
#tms-cc button:focus-visible, #tms-cc-modal :focus-visible { outline: 3px solid #4589ff; outline-offset: 3px; }

#tms-cc-modal .tms-cc-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    -webkit-appearance: checkbox;
    appearance: auto;
    opacity: 1 !important;
    filter: none !important;
}

/* The theme's window.load formatter ignores .not_unifrom and wraps these inputs.
   Show their real state and neutralize only these wrappers, even after a late
   Uniform refresh. Its disabled sprite otherwise hides Necessary's checkmark. */
#tms-cc-modal .tms-cc-toggle .checker,
#tms-cc-modal .tms-cc-toggle .checker > span {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    background: none !important;
}

#tms-cc-modal .tms-cc-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

#tms-cc-modal .tms-cc-btn {
    border: 1px solid rgba(0,0,0,0.25);
    background: #fff;
    color: #000;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
}

#tms-cc-modal .tms-cc-btn.primary {
    background: #000;
    color: #fff;
    border-color: #000;
}

html.tms-cc-noscroll, body.tms-cc-noscroll {
    overflow: hidden;
}

/* small screens */
@media (max-width: 768px) {
    #tms-cc .tms-cc-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
    #tms-cc-modal .tms-cc-dialog { margin: 4vh 12px 0 12px; }
}
