/* Motion recipes: Transitions.dev — Modal open / close and Success check.
 * https://transitions.dev/transitions/modal-open-close/
 * https://transitions.dev/transitions/success-check/
 * Used as product snippets under https://transitions.dev/terms.html.
 */
:root {
  --modal-open-dur: 250ms;
  --modal-close-dur: 150ms;
  --modal-scale: 0.96;
  --modal-scale-close: 0.96;
  --modal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --check-opacity-dur: 500ms;
  --check-rotate-dur: 500ms;
  --check-rotate-from: 80deg;
  --check-bob-dur: 500ms;
  --check-y-amount: 40px;
  --check-blur-dur: 500ms;
  --check-blur-from: 10px;
  --check-path-dur: 500ms;
  --check-path-delay: 80ms;
  --check-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-opacity: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-rotate: cubic-bezier(0.22, 1, 0.36, 1);
  --check-ease-bob: cubic-bezier(0.34, 1.35, 0.64, 1);
  --check-ease-path: cubic-bezier(0.22, 1, 0.36, 1);
}

.t-modal {
  transform-origin: center;
  transform: scale(var(--modal-scale));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-open-dur) var(--modal-ease),
    opacity   var(--modal-open-dur) var(--modal-ease);
  will-change: transform, opacity;
}
.t-modal.is-open {
  transform: scale(1);
  opacity: 1;
  pointer-events: auto;
}
.t-modal.is-closing {
  transform: scale(var(--modal-scale-close));
  opacity: 0;
  pointer-events: none;
  transition:
    transform var(--modal-close-dur) var(--modal-ease),
    opacity   var(--modal-close-dur) var(--modal-ease);
}

@media (prefers-reduced-motion: reduce) {
  .t-modal { transition: none !important; }
}

/* Wrapper drives the appear animation; it doesn't own any
   sizing or color so you can drop in any icon. */
.t-success-check {
  display: inline-block;
  transform-origin: center;
  opacity: 0;
  will-change: transform, opacity, filter;
}
/* overflow: visible keeps the stroke from clipping while it
   draws; display: block kills the inline whitespace under SVGs. */
.t-success-check svg { display: block; overflow: visible; }
/* The controller calibrates these placeholders from the actual SVG path. */
.t-success-check svg path {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
}

.t-success-check[data-state="in"] {
  animation:
    t-check-fade   var(--check-opacity-dur) var(--check-ease-opacity) forwards,
    t-check-rotate var(--check-rotate-dur)  var(--check-ease-rotate)  forwards,
    t-check-blur   var(--check-blur-dur)    var(--check-ease-out)     forwards,
    t-check-bob    var(--check-bob-dur)     var(--check-ease-bob)     forwards;
}
.t-success-check[data-state="in"] svg path {
  animation: t-check-draw var(--check-path-dur) var(--check-ease-path) var(--check-path-delay, 0ms) forwards;
}

@keyframes t-check-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes t-check-rotate {
  from { transform: rotate(var(--check-rotate-from)); }
  to   { transform: rotate(0deg); }
}
@keyframes t-check-blur {
  from { filter: blur(var(--check-blur-from)); }
  to   { filter: blur(0); }
}
@keyframes t-check-bob {
  from { translate: 0 var(--check-y-amount); }
  to   { translate: 0 0; }
}
@keyframes t-check-draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .t-success-check { animation: none !important; opacity: 1; }
  .t-success-check svg path { animation: none !important; stroke-dashoffset: 0 !important; }
}

html.tavi-notice-open { overflow: hidden; }
.tavi-notice {
  box-sizing: border-box;
  width: min(560px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text, #17364d);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.65;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.tavi-notice::backdrop { background: rgb(23 54 77 / 42%); }
.tavi-notice-card {
  padding: 28px;
  border: 1px solid var(--color-border, #d9e3eb);
  border-radius: 12px;
  background: var(--color-surface, #fff);
  box-shadow: 0 20px 60px rgb(9 74 120 / 16%);
  /* Retune the check's travel to fit a button-sized confirmation. */
  --check-y-amount: 8px;
  --check-blur-from: 2px;
}
.tavi-notice-topline { display: flex; align-items: center; justify-content: space-between; }
.tavi-notice-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--color-selected, #e7f3fb);
  color: var(--color-primary, #0b78b6);
  font-size: 30px;
  line-height: 1;
}
.tavi-notice h2 {
  margin: 18px 0 10px;
  color: inherit;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.5px;
}
.tavi-notice h2:focus { outline: none; }
.tavi-notice p { margin: 0; }
.tavi-notice #tavi-notice-intro { font-weight: 600; }
.tavi-notice ul { margin: 18px 0 24px; padding-left: 20px; list-style: disc; }
.tavi-notice li { margin: 10px 0; padding-left: 3px; }
.tavi-notice li::marker { color: var(--color-primary, #0b78b6); }
.tavi-notice button { font: inherit; cursor: pointer; }
.tavi-notice .tavi-notice-accept {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 0;
  border-radius: 7px;
  background: var(--color-primary, #0b78b6);
  color: var(--color-on-primary, #fff);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
.tavi-notice .tavi-notice-accept:hover { background: var(--color-primary-hover, #094a78); }
.tavi-notice .tavi-notice-accept[aria-disabled="true"] { cursor: default; }
.tavi-notice-arrow { font-size: 20px; line-height: 1; }
.tavi-notice-accept .t-success-check { display: none; flex: none; }
.is-accepting .tavi-notice-accept .t-success-check { display: inline-block; }
.is-accepting .tavi-notice-arrow { display: none; }
.tavi-notice .tavi-notice-session {
  margin-top: 14px;
  color: var(--color-muted, #596b7a);
  font-size: 11px;
  text-align: center;
}
.tavi-notice .tavi-notice-close,
button.tavi-disclaimer-link {
  padding: 4px 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--color-muted, #596b7a);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
}
.tavi-notice .tavi-notice-close[hidden] { display: none; }
.tavi-notice .tavi-notice-close:hover,
button.tavi-disclaimer-link:hover { color: var(--color-primary, #0b78b6); text-decoration: underline; }
.tavi-notice button:focus-visible,
button.tavi-disclaimer-link:focus-visible { outline: 2px solid var(--color-focus, #0b78b6); outline-offset: 3px; }
.tavi-notice-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.sizing-disclaimer { margin-top: 12px; text-align: center; }
@media (max-width: 450px) {
  .tavi-notice-card { padding: 22px 20px; }
  .tavi-notice h2 { font-size: 21px; }
}
