/**
 * "Try the new design" popup on the old site (Partials/_UiTryNewPopup).
 *
 * The old layouts don't load the design system, so the values the popup needs are copied
 * from its tokens and scoped to the block. Sizes are in px and the base properties are set
 * explicitly because the old layouts ship global type, button and link styles
 * (bootstrap, bulma, material) that would otherwise leak in.
 */
.ui-try-new {
    --utn-dark: #313131;
    --utn-light: #E9E9E9;
    --utn-white: #FFFFFF;
    /* The design system's accessible action fill (4.83:1 under white text). */
    --utn-action: #CB4229;
    --utn-action-hover: #B03722;
    --utn-s-2: 8px;
    --utn-s-3: 16px;
    --utn-s-4: 24px;
    --utn-radius-lg: 16px;
    --utn-shadow-3: 0 16px 40px rgba(49, 49, 49, 0.10), 0 4px 10px rgba(49, 49, 49, 0.05);
    --utn-font: "Nuckle", "Manrope", "Helvetica Neue", Helvetica, Arial, sans-serif;

    position: fixed;
    left: var(--utn-s-3);
    bottom: var(--utn-s-3);
    /* Above the old sticky headers and menus. */
    z-index: 10000;
    box-sizing: border-box;
    width: calc(100% - 2 * var(--utn-s-3));
    max-width: 360px;
    padding: var(--utn-s-4);
    background: var(--utn-white);
    color: var(--utn-dark);
    border: 1px solid var(--utn-light);
    border-radius: var(--utn-radius-lg);
    box-shadow: var(--utn-shadow-3);
    font-family: var(--utn-font);
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
    animation: ui-try-new-in 240ms ease-out;
}

.ui-try-new *,
.ui-try-new *::before,
.ui-try-new *::after {
    box-sizing: border-box;
}

/* Some old stylesheets don't include the [hidden] rule. */
.ui-try-new[hidden] {
    display: none;
}

.ui-try-new__title {
    margin: 0 var(--utn-s-4) var(--utn-s-2) 0;
    padding: 0;
    color: var(--utn-dark);
    font-family: var(--utn-font);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    text-transform: none;
}

.ui-try-new__text {
    margin: 0 0 var(--utn-s-3);
    padding: 0;
    color: var(--utn-dark);
    font-size: 15px;
    line-height: 1.5;
}

.ui-try-new__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--utn-s-2);
}

.ui-try-new__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin: 0;
    padding: 0 20px;
    font-family: var(--utn-font);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    text-decoration: none;
    text-transform: none;
    border: 1.5px solid transparent;
    border-radius: 999px;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.ui-try-new__btn--primary,
.ui-try-new__btn--primary:visited {
    background: var(--utn-action);
    border-color: var(--utn-action);
    color: var(--utn-white);
}

.ui-try-new__btn--primary:hover,
.ui-try-new__btn--primary:focus {
    background: var(--utn-action-hover);
    border-color: var(--utn-action-hover);
    color: var(--utn-white);
    text-decoration: none;
}

.ui-try-new__btn--ghost {
    background: transparent;
    border-color: var(--utn-light);
    color: var(--utn-dark);
}

.ui-try-new__btn--ghost:hover {
    border-color: var(--utn-dark);
}

.ui-try-new__close {
    position: absolute;
    top: var(--utn-s-2);
    right: var(--utn-s-2);
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: var(--utn-dark);
    font-family: var(--utn-font);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.ui-try-new__close:hover {
    background: var(--utn-light);
}

.ui-try-new__btn:focus-visible,
.ui-try-new__close:focus-visible {
    outline: 2px solid var(--utn-dark);
    outline-offset: 2px;
}

@keyframes ui-try-new-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ui-try-new {
        animation: none;
    }
}

@media print {
    .ui-try-new {
        display: none;
    }
}
