/* Shared popup layout, campaign styling, and reduced-motion-aware effects. */
.scrabble-word-trigger[hidden] {
    display: none;
}

.promotion-dialog {
    box-sizing: border-box;
    width: min(30rem, calc(100% - 2rem));
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: clamp(1.25rem, 5vw, 2.5rem);
    border: 2px solid #66452f;
    border-radius: 12px;
    background: #fff9ed;
    color: #30271f;
    text-align: center;
    box-shadow: 0 14px 30px rgba(20, 26, 28, 0.24);
}

.promotion-dialog::backdrop {
    background: rgba(20, 26, 28, 0.65);
}

.promotion-dialog h2 {
    margin-top: 0;
}

.scrabble-special-word {
    margin: 0.5rem 0;
    font-size: clamp(2.5rem, 12vw, 4rem);
    font-weight: 700;
    letter-spacing: 0.06em;
}

.holiday-promotion-dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    height: fit-content;
    width: min(32rem, calc(100vw - 2rem));
    padding: clamp(1.5rem, 6vw, 2.75rem);
    border: 1px solid #ff4d5f;
    border-top-width: 4px;
    border-radius: 1rem;
    background: #111;
    color: #f5f5f5;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}

.holiday-promotion-dialog::backdrop { background: rgba(0, 0, 0, 0.8); }

.holiday-promotion-dialog,
.holiday-promotion-dialog * {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-variant-caps: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

.holiday-promotion-dialog h2 {
    margin: 0.5rem 0 0;
    padding-top: 1.75rem;
    color: #ff4d5f;
    font-family: "Arial Black", "DejaVu Sans", sans-serif;
    font-weight: 900;
    font-size: min(5rem, 14vw);
    line-height: 1;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

.holiday-promotion-dialog h2 span { display: block; }

.holiday-promotion-dialog .holiday-event-description {
    margin: 1.25rem 0;
    color: #e0e0e0;
    font-size: 1.05rem;
    line-height: 1.55;
}

.holiday-promotion-dialog #holiday-coupon-message {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.holiday-promotion-dialog strong { display: block; margin-top: 1.5rem; }

.holiday-discount-prefix {
    display: block;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
    font-size: 1rem;
    letter-spacing: 0.1em;
}

.holiday-discount {
    display: block;
    color: #ff4d5f;
    font-family: "Arial Black", "DejaVu Sans", sans-serif;
    font-size: clamp(2.5rem, 12vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

.holiday-discount-scope {
    display: block;
    margin-top: 0.75rem;
    color: #f5f5f5;
    font-size: 1.1rem;
    line-height: 1.5;
}

.holiday-coupon-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid #ff4d5f;
    border-radius: 0.4rem;
    background: #111;
    color: #ff4d5f;
    font: 700 48px/1 Arial, sans-serif;
    cursor: pointer;
}

.holiday-coupon-close:hover { background: #ff4d5f; color: #111; }
.holiday-coupon-close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

@media (prefers-reduced-motion: no-preference) {
    .holiday-promotion-dialog[open] { animation: holiday-coupon-arrive 300ms ease-out both; }
}

@keyframes holiday-coupon-arrive {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
