/* Timber's timing and card/sheet motion, using Titan's surface and CTA system. */
.tnl {
    position: fixed;
    inset: 0;
    z-index: 1000000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .2s ease;
}
.tnl[hidden], .tnl [hidden] { display: none !important; }
.tnl.is-open { opacity: 1; transition: opacity .28s ease; }
.tnl .tnl__card {
    position: relative;
    width: min(460px, 100%);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    box-sizing: border-box;
    background: var(--tv-overlay);
    border: 1px solid var(--tv-line-strong);
    border-radius: 16px;
    padding: clamp(24px, 4vw, 34px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
    color: #fff;
    opacity: 0;
    transform: translateY(20px) scale(.97);
    transition: transform .2s cubic-bezier(.4, 0, 1, 1), opacity .16s ease;
}
.tnl.is-open .tnl__card {
    opacity: 1;
    transform: none;
    transition: transform .45s cubic-bezier(.22, 1, .36, 1), opacity .28s ease;
}
.tnl .tnl__card:focus { outline: none; }
.tnl .tnl__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: 1px solid var(--tv-line-strong);
    border-radius: 50%;
    background: var(--tv-surface-solid);
    color: #fff;
    cursor: pointer;
    transition: background .2s ease, transform .25s ease;
}
.tnl .tnl__close svg { width: 16px; height: 16px; }
.tnl .tnl__close:hover { background: var(--tv-select); transform: rotate(90deg); }
.tnl .tnl__close:focus-visible { outline: 2px solid var(--tv-cta-red-border); outline-offset: 2px; }
.tnl .tnl__heading { margin: 0 0 12px; padding-right: 36px; color: #fff; font-size: clamp(22px, 3.4vw, 28px); line-height: 1.15; }
.tnl .tnl__text { margin: 0 0 20px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .8); }
#titan-newsletter .tnl__form { display: block; max-width: none; margin: 0; padding: 0; box-shadow: none; background: none; letter-spacing: normal; }
#titan-newsletter .tnl__label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: #fff; text-transform: none; letter-spacing: normal; }
#titan-newsletter .tnl__input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 11px 13px;
    margin: 0 0 14px;
    font: inherit;
    font-size: 16px;
    line-height: 1.3;
    color: #fff;
    background: var(--tv-well);
    border: 1px solid var(--tv-line-strong);
    border-radius: 8px;
}
.tnl .tnl__input:focus { outline: 2px solid var(--tv-cta-red-border); outline-offset: 2px; }
#titan-newsletter .tnl__consent { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; line-height: 1.5; margin: 0 0 14px; text-transform: none; letter-spacing: normal; text-align: left; }
#titan-newsletter .tnl__consent span, #titan-newsletter .tnl__consent a { color: rgba(255, 255, 255, .8); font-weight: 400; }
.tnl .tnl__consent input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; accent-color: #b91212; }
.tnl .tnl__consent a { text-decoration: underline; }
.tnl .tnl__captcha { min-height: 78px; margin-bottom: 14px; }
.tnl .tnl__trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tnl .tnl__error { font-size: 14px; color: #ffaaaa; line-height: 1.5; margin: 0 0 14px; }
.tnl .tnl__actions { display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
.tnl .tnl__dismiss { align-self: center; padding: 4px 8px; margin-top: 6px; border: 0; background: none; color: rgba(255, 255, 255, .65); font: inherit; font-size: 13px; text-transform: none; text-decoration: underline; cursor: pointer; }
#titan-newsletter .tnl__actions .tv-cta { max-width: none; margin-top: 0; }
.tnl .tnl__provider, .tnl .tnl__countdown { margin: 12px 0 0; color: rgba(255, 255, 255, .6); font-size: 12px; line-height: 1.5; }
.tnl .tnl__countdown { font-variant-numeric: tabular-nums; }
.tnl .tnl__success { text-align: center; padding-top: 6px; }
.tnl .tnl__success .tnl__heading { padding-right: 0; }
.tnl .tnl__check { display: block; width: 74px; height: 74px; margin: 0 auto 16px; }
.tnl .tnl__check svg { width: 100%; height: 100%; }
.tnl .tnl__check circle { fill: #5fa347; }
.tnl .tnl__check path { fill: none; stroke: #fff; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 34; stroke-dashoffset: 34; }
.tnl.is-success .tnl__check { animation: tnl-pop .5s cubic-bezier(.16, 1.3, .4, 1) both; }
.tnl.is-success .tnl__check path { animation: tnl-draw .32s .3s ease-out forwards; }
@keyframes tnl-pop { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.1); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes tnl-draw { to { stroke-dashoffset: 0; } }
.tnl--inline { position: relative; z-index: auto; opacity: 1; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tnl--inline .tnl__card { opacity: 1; transform: none; max-height: none; }
@media (max-width: 749px) {
    .tnl:not(.tnl--inline) { padding: 0; align-items: flex-end; }
    .tnl:not(.tnl--inline) .tnl__card { width: 100%; max-height: calc(100dvh - 24px); border-radius: 32px 32px 0 0; transform: translateY(100%); padding: 36px 24px calc(32px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; }
    .tnl:not(.tnl--inline) .tnl__close { top: 16px; right: 16px; width: 44px; height: 44px; margin: 0; }
    .tnl:not(.tnl--inline) [data-tnl-entry] .tnl__heading { padding-right: 44px; }
    .tnl.is-open .tnl__card { transform: none; }
}
@media (max-width: 359px) {
    .tnl:not(.tnl--inline) .tnl__card { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .tnl, .tnl .tnl__card, .tnl .tnl__close { transition: none; }
    .tnl.is-success .tnl__check, .tnl.is-success .tnl__check path { animation: none; }
    .tnl .tnl__check path { stroke-dashoffset: 0; }
}
