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

.marketing-consent,
.marketing-consent * {
    box-sizing: border-box;
}

.marketing-consent {
    --consent-accent: var(--sunwayman-red, #8b0000);
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    left: max(20px, env(safe-area-inset-left, 0px));
    z-index: 10010;
    width: min(440px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px - env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px;
    border: 1px solid #dfdcd6;
    border-top: 2px solid var(--consent-accent);
    border-radius: 12px;
    /* A light surface separates the floating panel from the site's dark photography. */
    background: #f7f6f3;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3), 0 28px 80px rgba(0, 0, 0, 0.5);
    color: #25282e;
    color-scheme: light;
    font-family: "AlibabaSans", Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    text-align: start;
    scrollbar-width: thin;
    scrollbar-color: #aaa59c #f7f6f3;
}

.marketing-consent__header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.marketing-consent__brand-mark {
    display: block;
    flex: 0 0 auto;
    width: 44px;
    height: 48px;
    object-fit: contain;
}

.marketing-consent__heading {
    min-width: 0;
}

.marketing-consent .marketing-consent__brand {
    margin: 0 0 4px;
    color: #717680;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    line-height: 1.4;
}

/* Scope heading typography explicitly so the site's dark theme cannot hide the title. */
.marketing-consent .marketing-consent__title {
    margin: 0;
    color: #202329;
    font-family: inherit;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-transform: none;
}

.marketing-consent .marketing-consent__description {
    margin: 16px 0 0;
    color: #555b65;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.marketing-consent__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.marketing-consent__actions button {
    display: flex;
    min-width: 0;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border: 1px solid var(--consent-accent);
    border-radius: 6px;
    background: var(--consent-accent);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
    white-space: normal;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.marketing-consent__actions button[data-marketing-choice="rejected"] {
    border-color: #c9c5bd;
    background: #fff;
    color: #292d34;
}

.marketing-consent__actions button[data-marketing-choice="accepted"]:hover {
    border-color: #a80000;
    background: #a80000;
}

.marketing-consent__actions button[data-marketing-choice="rejected"]:hover {
    border-color: #a8a39a;
    background: #eeece7;
}

.marketing-consent__footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #dedbd5;
}

.marketing-consent__footer a {
    color: #626772;
    font-size: 12px;
    line-height: 1.5;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 160ms ease;
}

.marketing-consent__footer a:hover {
    color: var(--consent-accent);
}

.marketing-consent__actions button:focus-visible,
.marketing-consent__footer a:focus-visible {
    outline: 2px solid var(--consent-accent);
    outline-offset: 3px;
}

.marketing-consent .marketing-consent__status {
    margin: 14px 0 0;
    padding: 10px 12px;
    border: 1px solid #dedbd5;
    border-radius: 6px;
    background: #eeece7;
    color: #4b515a;
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.marketing-consent [data-marketing-status]:empty {
    display: none;
}

/* Keep both choices reachable on narrow screens, including devices with a home indicator. */
@media (max-width: 520px) {
    .marketing-consent {
        right: max(12px, env(safe-area-inset-right, 0px));
        bottom: max(12px, env(safe-area-inset-bottom, 0px));
        left: max(12px, env(safe-area-inset-left, 0px));
        width: auto;
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .marketing-consent__actions button,
    .marketing-consent__footer a {
        transition: none;
    }
}
