/* TRACK-V1-01C — Omega first-party consent UI (all rules scoped to .omega-consent) */

.omega-consent [hidden] {
    display: none !important;
}

/* --- Compact bottom banner ------------------------------------------------ */

.omega-consent__banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 100000;
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 24px;
    background: #ffffff;
    color: #1d1d1d;
    border: 1px solid #dcd8d2;
    border-top: 3px solid #1d1d1d;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
    font-size: 15px;
    line-height: 1.5;
}

.omega-consent .omega-consent__copy {
    flex: 1 1 auto;
    min-width: 0;
}

.omega-consent .omega-consent__title {
    margin: 0 0 6px;
    padding: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
    color: #1d1d1d;
}

.omega-consent .omega-consent__text {
    margin: 0;
    color: #3a3a3a;
}

.omega-consent .omega-consent__policy {
    margin: 6px 0 0;
    font-size: 14px;
}

.omega-consent .omega-consent__policy a {
    color: #1d1d1d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.omega-consent__actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* --- Buttons ------------------------------------------------------------- */

.omega-consent .omega-consent__btn {
    min-height: 44px;
    padding: 10px 20px;
    border: 2px solid #1d1d1d;
    border-radius: 0;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
}

/* Allow All */
.omega-consent .omega-consent__btn--primary {
    background: #1d1d1d;
    color: #ffffff;
}

.omega-consent .omega-consent__btn--primary:hover {
    background: #3a3a3a;
    border-color: #3a3a3a;
}

/* Necessary Only / Save Preferences: same size and border weight, full contrast */
.omega-consent .omega-consent__btn--secondary {
    background: #ffffff;
    color: #1d1d1d;
}

.omega-consent .omega-consent__btn--secondary:hover {
    background: #f1eee9;
}

/* Preferences: link-style, still a 44px button target */
.omega-consent .omega-consent__btn--link {
    padding: 10px 8px;
    border-color: transparent;
    background: transparent;
    color: #1d1d1d;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.omega-consent .omega-consent__btn--link:hover {
    text-decoration-thickness: 2px;
}

.omega-consent button:focus-visible,
.omega-consent input:focus-visible,
.omega-consent a:focus-visible {
    outline: 3px solid #0a66c2;
    outline-offset: 2px;
}

/* --- Preferences dialog ------------------------------------------------- */

.omega-consent__dialog {
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    border: 1px solid #dcd8d2;
    border-top: 3px solid #1d1d1d;
    background: #ffffff;
    color: #1d1d1d;
    font-size: 15px;
    line-height: 1.5;
    overflow: auto;
}

/* Also covers the fallback when <dialog> is unsupported (open attribute only) */
.omega-consent__dialog[open] {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 100001;
    transform: translate(-50%, -50%);
    margin: 0;
}

.omega-consent__dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.omega-consent .omega-consent__dialog-inner {
    position: relative;
    padding: 28px 24px 24px;
}

.omega-consent .omega-consent__dialog .omega-consent__title {
    margin-right: 40px;
}

.omega-consent .omega-consent__dialog .omega-consent__text {
    margin-bottom: 18px;
}

.omega-consent .omega-consent__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1d1d1d;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.omega-consent .omega-consent__option {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: 16px;
    align-items: center;
    margin: 0;
    padding: 14px 0;
    border-top: 1px solid #e8e4de;
}

.omega-consent .omega-consent__option-name {
    margin: 0;
    font-weight: 600;
    color: #1d1d1d;
}

.omega-consent label.omega-consent__option-name {
    cursor: pointer;
}

.omega-consent .omega-consent__option-desc {
    grid-column: 1 / -1;
    margin: 4px 0 0;
    font-size: 14px;
    color: #4a4a4a;
}

/* Necessary: plain status text, not a control */
.omega-consent .omega-consent__status {
    padding: 3px 10px;
    border: 1px solid #c9c4bc;
    background: #f5f3ef;
    color: #3a3a3a;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

/* Statistics / Marketing: native checkbox styled as a switch (keyboard and AT unchanged) */
.omega-consent .omega-consent__switch {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    width: 46px;
    height: 26px;
    margin: 0;
    border: 2px solid #1d1d1d;
    border-radius: 13px;
    background: #ffffff;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.omega-consent .omega-consent__switch::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1d1d1d;
    transition: transform 0.15s ease;
}

.omega-consent .omega-consent__switch:checked {
    background: #1d1d1d;
}

.omega-consent .omega-consent__switch:checked::before {
    background: #ffffff;
    transform: translateX(20px);
}

.omega-consent .omega-consent__dialog .omega-consent__actions {
    justify-content: flex-end;
    margin-top: 18px;
}

/* --- Persistent reopen control -------------------------------------------- */

.omega-consent .omega-consent__reopen {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 99999;
    min-height: 36px;
    padding: 6px 12px;
    border: 1px solid #1d1d1d;
    border-radius: 0;
    background: #ffffff;
    color: #1d1d1d;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .omega-consent .omega-consent__switch,
    .omega-consent .omega-consent__switch::before {
        transition: none;
    }
}

/* --- Mobile stacking --------------------------------------------------- */

@media (max-width: 860px) {
    .omega-consent__banner {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
}

@media (max-width: 640px) {
    .omega-consent__banner {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 16px;
    }

    /* Stacked in DOM order, so visual order always matches Tab order */
    .omega-consent .omega-consent__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .omega-consent .omega-consent__btn {
        width: 100%;
        white-space: normal;
    }
}
