/* ==========================================================================
   TIO Admin – Design Tokens & Base Styles
   Scoped under .tio-wrap so nothing leaks into WordPress admin.
   Source of truth: the-image-optimizer-web/apps/web/src/styles/tokens/
   ========================================================================== */

/* --- Base Reset --------------------------------------------------------- */

.tio-wrap {
  box-sizing: border-box;
  font-family: "Roboto Slab", serif;
  font-size: 16px;
  line-height: 24px;
  color: var(--tio-colour-sys-on-surface-alt);
  background-color: var(--tio-colour-sys-surface);
  padding: var(--tio-space-8);
  margin: 0;
  min-height: calc(100vh - 32px); /* fill viewport minus WP admin bar */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Override WP admin padding so .tio-wrap bleeds edge-to-edge */
#wpbody-content:has(> .tio-wrap) {
  padding-bottom: 0;
}

#wpcontent:has(.tio-wrap) {
  padding-left: 0;
}

.tio-wrap *,
.tio-wrap *::before,
.tio-wrap *::after {
  box-sizing: inherit;
  color: inherit;
}

.tio-wrap h1,
.tio-wrap h2,
.tio-wrap h3,
.tio-wrap h4,
.tio-wrap h5,
.tio-wrap h6 {
  color: var(--tio-colour-sys-on-surface);
}

.tio-wrap .tio-content {
  display: flex;
  flex-direction: column;
  gap: var(--tio-space-8);
  max-width: 800px;
}

/* --- Widget Component --------------------------------------------------- */

.tio-wrap .tio-widget {
  display: flex;
  flex-direction: column;
  gap: var(--tio-space-4);
  padding: var(--tio-space-card-padding);
  border: 2px solid var(--tio-colour-sys-outline);
  border-radius: var(--tio-radius-card);
  background-color: #fff;
}

.tio-wrap .tio-widget--success {
  border-color: var(--tio-colour-sys-success);
}

.tio-wrap .tio-widget--error {
  border-color: var(--tio-colour-sys-error);
}

/* Widget – row variant (content left, action right) */
.tio-wrap .tio-widget--row {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

/* Widget sub-elements */
.tio-wrap .tio-widget__header {
  display: flex;
  gap: var(--tio-space-4);
  align-items: center;
}

.tio-wrap .tio-widget__icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  transform: scaleX(-1);
}

.tio-wrap .tio-widget__text {
  display: flex;
  flex-direction: column;
  gap: var(--tio-space-2);
}

.tio-wrap .tio-widget__title {
  font-family: var(--tio-text-body-lg-font-family);
  font-size: var(--tio-text-body-lg-font-size);
  line-height: var(--tio-text-body-lg-line-height);
  font-weight: 700;
  color: var(--tio-colour-sys-on-surface);
  margin: 0;
}

.tio-wrap .tio-widget__desc {
  font-family: var(--tio-text-body-md-font-family);
  font-size: var(--tio-text-body-md-font-size);
  line-height: var(--tio-text-body-md-line-height);
  color: var(--tio-colour-sys-on-surface-alt);
  margin: 0;
}

/* Two-column grid (credits + plan side-by-side) */
.tio-wrap .tio-grid-2 {
  display: flex;
  gap: var(--tio-space-8);
}

.tio-wrap .tio-grid-2 > * {
  flex: 1;
  min-width: 0;
}

/* Key-value stat display (credits widget) */
.tio-wrap .tio-stat__value {
  margin: 0;
}

.tio-wrap .tio-stat__detail {
  display: flex;
  gap: var(--tio-space-2);
  align-items: center;
  flex-wrap: wrap;
}

.tio-wrap .tio-stat__detail-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--tio-colour-sys-on-surface-alt);
  flex-shrink: 0;
}

/* --- Button Component --------------------------------------------------- */

.tio-wrap .tio-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px 32px;
  border: 2px solid transparent;
  border-radius: var(--tio-radius-md);
  font-family: var(--tio-text-label-font-family);
  font-size: var(--tio-text-label-font-size);
  line-height: var(--tio-text-label-line-height);
  letter-spacing: var(--tio-text-label-letter-spacing);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--tio-duration-fast) var(--tio-ease-out),
              border-color var(--tio-duration-fast) var(--tio-ease-out);
}

/* Filled (default) */
.tio-wrap .tio-button--filled {
  background-color: var(--tio-colour-sys-primary);
  color: var(--tio-colour-sys-on-primary);
}

.tio-wrap .tio-button--filled:hover {
  background-color: color-mix(in srgb, var(--tio-colour-sys-primary) 88%, var(--tio-colour-sys-on-primary));
}

.tio-wrap .tio-button--filled:disabled,
.tio-wrap .tio-button--filled.is-disabled {
  background-color: var(--tio-colour-sys-primary-container);
  color: var(--tio-colour-sys-primary);
  cursor: not-allowed;
}

/* Outlined */
.tio-wrap .tio-button--outlined {
  background-color: var(--tio-colour-sys-primary-container);
  border-color: var(--tio-colour-sys-primary);
  color: var(--tio-colour-sys-on-primary-container);
}

.tio-wrap .tio-button--outlined:hover {
  background-color: color-mix(in srgb, var(--tio-colour-sys-primary-container) 92%, var(--tio-colour-sys-on-primary-container));
}

.tio-wrap .tio-button--outlined:disabled,
.tio-wrap .tio-button--outlined.is-disabled {
  border-color: var(--tio-colour-state-layer-primary-opacity-16);
  color: var(--tio-colour-state-layer-on-primary-container-opacity-16);
  cursor: not-allowed;
}

/* Full-width modifier */
.tio-wrap .tio-button--full-width {
  width: 100%;
}

/* --- LinkButton Component ----------------------------------------------- */

.tio-wrap .tio-link-button {
  display: inline-flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  color: var(--tio-colour-sys-on-surface);
}

.tio-wrap .tio-link-button__label {
  font-family: var(--tio-text-body-sm-font-family);
  font-size: var(--tio-text-body-sm-font-size);
  line-height: var(--tio-text-body-sm-line-height);
  font-weight: 700;
}

.tio-wrap .tio-link-button__chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.tio-wrap .tio-link-button::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 6px;
  background-color: var(--tio-colour-sys-primary);
  transition: background-color var(--tio-duration-fast) var(--tio-ease-out);
}

.tio-wrap .tio-link-button:hover::after {
  background-color: var(--tio-colour-sys-secondary);
}

/* --- Tag Component ------------------------------------------------------ */

.tio-wrap .tio-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: var(--tio-space-1) var(--tio-space-2);
  background-color: var(--tio-colour-sys-secondary);
  border-radius: var(--tio-radius-sm);
}

.tio-wrap .tio-tag__label {
  font-family: var(--tio-text-caption-font-family);
  font-size: var(--tio-text-caption-font-size);
  line-height: var(--tio-text-caption-line-height);
  letter-spacing: var(--tio-text-caption-letter-spacing);
  text-transform: uppercase;
  color: var(--tio-colour-sys-on-secondary);
}

/* --- Checkbox Component ------------------------------------------------- */

.tio-wrap .tio-checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--tio-space-4);
  cursor: pointer;
}

.tio-wrap .tio-checkbox__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tio-wrap .tio-checkbox__box {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border: 2px solid var(--tio-colour-sys-outline);
  border-radius: var(--tio-radius-md);
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--tio-duration-fast) var(--tio-ease-out),
              border-width var(--tio-duration-fast) var(--tio-ease-out);
}

.tio-wrap .tio-checkbox__checkmark {
  width: 30px;
  height: 26px;
  color: var(--tio-colour-sys-primary);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity var(--tio-duration-fast) var(--tio-ease-out),
              transform var(--tio-duration-fast) var(--tio-ease-out);
}

.tio-wrap .tio-checkbox__label {
  font-family: var(--tio-text-body-md-font-family);
  font-size: var(--tio-text-body-md-font-size);
  line-height: var(--tio-text-body-md-line-height);
  color: var(--tio-colour-sys-on-surface);
}

/* Hover */
.tio-wrap .tio-checkbox:hover .tio-checkbox__box {
  border-color: var(--tio-colour-sys-primary);
}

/* Checked */
.tio-wrap .tio-checkbox__input:checked ~ .tio-checkbox__box {
  border-color: var(--tio-colour-sys-primary);
  border-width: 4px;
}

.tio-wrap .tio-checkbox__input:checked ~ .tio-checkbox__box .tio-checkbox__checkmark {
  opacity: 1;
  transform: scale(1);
}

/* Focus-visible */
.tio-wrap .tio-checkbox__input:focus-visible ~ .tio-checkbox__box {
  outline: 2px solid var(--tio-colour-sys-primary);
  outline-offset: 2px;
}

/* Disabled */
.tio-wrap .tio-checkbox--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- TextField Component ------------------------------------------------ */

.tio-wrap .tio-textfield {
  display: flex;
  flex-direction: column;
  gap: var(--tio-space-2);
  width: 100%;
}

.tio-wrap .tio-textfield__label {
  font-family: var(--tio-text-label-font-family);
  font-size: var(--tio-text-label-font-size);
  line-height: var(--tio-text-label-line-height);
  color: var(--tio-colour-sys-on-surface);
}

.tio-wrap .tio-textfield__input {
  font-family: var(--tio-text-body-md-font-family);
  font-size: var(--tio-text-body-md-font-size);
  line-height: var(--tio-text-body-md-line-height);
  padding: var(--tio-space-4) var(--tio-space-6);
  border: 2px solid var(--tio-colour-sys-outline);
  border-radius: var(--tio-radius-input);
  background-color: #fff;
  color: var(--tio-colour-sys-on-surface);
  outline: none;
  width: 100%;
  transition: border-color var(--tio-duration-fast) var(--tio-ease-out);
}

.tio-wrap .tio-textfield__input::placeholder {
  color: var(--tio-colour-state-layer-on-surface-opacity-16);
}

.tio-wrap .tio-textfield__input:focus {
  border-color: var(--tio-colour-sys-primary);
}

.tio-wrap .tio-textfield__tooltip {
  display: flex;
  align-items: flex-start;
  gap: var(--tio-space-2);
}

.tio-wrap .tio-textfield__error {
  color: var(--tio-colour-sys-error);
}

/* Error state */
.tio-wrap .tio-textfield--error .tio-textfield__input {
  border-color: var(--tio-colour-sys-error);
}

.tio-wrap .tio-textfield--error .tio-textfield__input:focus {
  border-color: var(--tio-colour-sys-error);
}

/* Disabled state */
.tio-wrap .tio-textfield--disabled .tio-textfield__input {
  background-color: var(--tio-colour-sys-surface);
  border-color: var(--tio-colour-state-layer-on-surface-opacity-16);
  color: var(--tio-colour-sys-on-surface-alt);
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Form Component ----------------------------------------------------- */

.tio-wrap .tio-form {
  display: flex;
  flex-direction: column;
  gap: var(--tio-space-4);
  width: 100%;
}

.tio-wrap .tio-form__fieldset {
  appearance: none;
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.tio-wrap .tio-form__body {
  display: flex;
  flex-direction: column;
  gap: var(--tio-space-4);
}

.tio-wrap .tio-form__fields {
  flex: 1;
  min-width: 0;
}

.tio-wrap .tio-form__actions {
  display: flex;
  flex-direction: column;
  gap: var(--tio-space-4);
}

.tio-wrap .tio-form__feedback {
  color: var(--tio-colour-sys-on-surface-alt);
}

.tio-wrap .tio-form__feedback--error {
  color: var(--tio-colour-sys-error);
}

.tio-wrap .tio-form__feedback--success {
  color: var(--tio-colour-sys-success);
}

/* Row layout variant (fields + action side-by-side) */
.tio-wrap .tio-form--row .tio-form__body {
  flex-direction: row;
  align-items: flex-start;
}

.tio-wrap .tio-form--row .tio-form__actions {
  flex-shrink: 0;
  padding-top: var(--tio-space-6);
}

/* --- Design Tokens ------------------------------------------------------ */

.tio-wrap {

  /* Colours – System
     -------------------------------------------------------------------- */
  --tio-colour-sys-primary: #30d9cc;
  --tio-colour-sys-secondary: #ffc733;
  --tio-colour-sys-on-primary: #1e293b;
  --tio-colour-sys-on-secondary: #000000;
  --tio-colour-sys-surface: #f8fafc;
  --tio-colour-sys-on-surface: #1e293b;
  --tio-colour-sys-on-surface-alt: #334155;
  --tio-colour-sys-outline: #475569;

  /* Colours – Container
     -------------------------------------------------------------------- */
  --tio-colour-sys-primary-container: #e9fbfa;
  --tio-colour-sys-on-primary-container: #1e293b;
  --tio-colour-sys-secondary-container: #fff8e5;
  --tio-colour-sys-on-secondary-container: #1e293b;

  /* Colours – Background
     -------------------------------------------------------------------- */
  --tio-colour-sys-background: #ffffff;

  /* Colours – Status
     -------------------------------------------------------------------- */
  --tio-colour-sys-success: #008127;
  --tio-colour-sys-error: #dd0101;

  /* Colours – State Layers – Primary
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-primary-opacity-08: rgba(48, 217, 204, 0.08);
  --tio-colour-state-layer-primary-opacity-12: rgba(48, 217, 204, 0.12);
  --tio-colour-state-layer-primary-opacity-16: rgba(48, 217, 204, 0.16);

  /* Colours – State Layers – Secondary
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-secondary-opacity-08: rgba(255, 199, 51, 0.08);
  --tio-colour-state-layer-secondary-opacity-12: rgba(255, 199, 51, 0.12);
  --tio-colour-state-layer-secondary-opacity-16: rgba(255, 199, 51, 0.16);

  /* Colours – State Layers – On Primary
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-on-primary-opacity-08: rgba(30, 41, 59, 0.08);
  --tio-colour-state-layer-on-primary-opacity-12: rgba(30, 41, 59, 0.12);
  --tio-colour-state-layer-on-primary-opacity-16: rgba(30, 41, 59, 0.16);

  /* Colours – State Layers – On Secondary
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-on-secondary-opacity-08: rgba(0, 0, 0, 0.08);
  --tio-colour-state-layer-on-secondary-opacity-12: rgba(0, 0, 0, 0.12);
  --tio-colour-state-layer-on-secondary-opacity-16: rgba(0, 0, 0, 0.16);

  /* Colours – State Layers – Primary Container
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-primary-container-opacity-08: rgba(233, 251, 250, 0.08);
  --tio-colour-state-layer-primary-container-opacity-12: rgba(233, 251, 250, 0.12);
  --tio-colour-state-layer-primary-container-opacity-16: rgba(233, 251, 250, 0.16);

  /* Colours – State Layers – On Primary Container
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-on-primary-container-opacity-08: rgba(51, 65, 85, 0.08);
  --tio-colour-state-layer-on-primary-container-opacity-12: rgba(51, 65, 85, 0.12);
  --tio-colour-state-layer-on-primary-container-opacity-16: rgba(51, 65, 85, 0.16);

  /* Colours – State Layers – Secondary Container
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-secondary-container-opacity-08: rgba(255, 248, 229, 0.08);
  --tio-colour-state-layer-secondary-container-opacity-12: rgba(255, 248, 229, 0.12);
  --tio-colour-state-layer-secondary-container-opacity-16: rgba(255, 248, 229, 0.16);

  /* Colours – State Layers – On Secondary Container
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-on-secondary-container-opacity-08: rgba(30, 41, 59, 0.08);
  --tio-colour-state-layer-on-secondary-container-opacity-12: rgba(30, 41, 59, 0.12);
  --tio-colour-state-layer-on-secondary-container-opacity-16: rgba(30, 41, 59, 0.16);

  /* Colours – State Layers – Surface
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-surface-opacity-08: rgba(248, 250, 252, 0.08);
  --tio-colour-state-layer-surface-opacity-12: rgba(248, 250, 252, 0.12);
  --tio-colour-state-layer-surface-opacity-16: rgba(248, 250, 252, 0.16);

  /* Colours – State Layers – On Surface
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-on-surface-opacity-08: rgba(30, 41, 59, 0.08);
  --tio-colour-state-layer-on-surface-opacity-12: rgba(30, 41, 59, 0.12);
  --tio-colour-state-layer-on-surface-opacity-16: rgba(30, 41, 59, 0.16);

  /* Colours – State Layers – On Surface Alt
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-on-surface-alt-opacity-08: rgba(51, 65, 85, 0.08);
  --tio-colour-state-layer-on-surface-alt-opacity-12: rgba(51, 65, 85, 0.12);
  --tio-colour-state-layer-on-surface-alt-opacity-16: rgba(51, 65, 85, 0.16);

  /* Colours – State Layers – Error
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-error-opacity-08: rgba(221, 1, 1, 0.08);
  --tio-colour-state-layer-error-opacity-12: rgba(221, 1, 1, 0.12);
  --tio-colour-state-layer-error-opacity-16: rgba(221, 1, 1, 0.16);

  /* Colours – State Layers – Success
     -------------------------------------------------------------------- */
  --tio-colour-state-layer-success-opacity-08: rgba(0, 129, 39, 0.08);
  --tio-colour-state-layer-success-opacity-12: rgba(0, 129, 39, 0.12);
  --tio-colour-state-layer-success-opacity-16: rgba(0, 129, 39, 0.16);

  /* Typography – Font Families
     -------------------------------------------------------------------- */
  --tio-font-family-brand: "Dela Gothic One", sans-serif;
  --tio-font-family-standard: "Roboto Slab", serif;

  /* Typography – Display
     -------------------------------------------------------------------- */
  --tio-text-display-font-family: "Dela Gothic One", sans-serif;
  --tio-text-display-font-size: 32px;
  --tio-text-display-line-height: 40px;
  --tio-text-display-letter-spacing: 0px;

  /* Typography – Heading
     -------------------------------------------------------------------- */
  --tio-text-heading-font-family: "Roboto Slab", serif;
  --tio-text-heading-font-size: 28px;
  --tio-text-heading-line-height: 36px;
  --tio-text-heading-letter-spacing: 0px;

  /* Typography – Body Large
     -------------------------------------------------------------------- */
  --tio-text-body-lg-font-family: "Roboto Slab", serif;
  --tio-text-body-lg-font-size: 20px;
  --tio-text-body-lg-line-height: 32px;
  --tio-text-body-lg-letter-spacing: 0px;

  /* Typography – Body Medium
     -------------------------------------------------------------------- */
  --tio-text-body-md-font-family: "Roboto Slab", serif;
  --tio-text-body-md-font-size: 16px;
  --tio-text-body-md-line-height: 24px;
  --tio-text-body-md-letter-spacing: 0px;

  /* Typography – Body Small
     -------------------------------------------------------------------- */
  --tio-text-body-sm-font-family: "Roboto Slab", serif;
  --tio-text-body-sm-font-size: 14px;
  --tio-text-body-sm-line-height: 20px;
  --tio-text-body-sm-letter-spacing: 0px;

  /* Typography – Label
     -------------------------------------------------------------------- */
  --tio-text-label-font-family: "Dela Gothic One", sans-serif;
  --tio-text-label-font-size: 16px;
  --tio-text-label-line-height: 16px;
  --tio-text-label-letter-spacing: 0px;

  /* Typography – Caption
     -------------------------------------------------------------------- */
  --tio-text-caption-font-family: "Roboto Slab", serif;
  --tio-text-caption-font-size: 14px;
  --tio-text-caption-line-height: 16px;
  --tio-text-caption-letter-spacing: 1px;

  /* Typography – Key
     -------------------------------------------------------------------- */
  --tio-text-key-font-family: "Dela Gothic One", sans-serif;
  --tio-text-key-font-size: 32px;
  --tio-text-key-line-height: 32px;
  --tio-text-key-letter-spacing: 1px;

  /* Spacing – Scale (base 4px)
     -------------------------------------------------------------------- */
  --tio-space-0: 0;
  --tio-space-1: 0.25rem;
  --tio-space-2: 0.5rem;
  --tio-space-3: 0.75rem;
  --tio-space-4: 1rem;
  --tio-space-5: 1.25rem;
  --tio-space-6: 1.5rem;
  --tio-space-8: 2rem;
  --tio-space-10: 2.5rem;
  --tio-space-12: 3rem;
  --tio-space-16: 4rem;
  --tio-space-20: 5rem;
  --tio-space-24: 6rem;

  /* Spacing – Semantic
     -------------------------------------------------------------------- */
  --tio-space-page-gutter: 1rem;
  --tio-space-section-gap: 3rem;
  --tio-space-card-padding: 1.5rem;
  --tio-space-input-padding-x: 1rem;
  --tio-space-input-padding-y: 0.75rem;
  --tio-space-button-padding-x: 1.5rem;
  --tio-space-button-padding-y: 0.75rem;

  /* Spacing – Responsive Page Gutters
     -------------------------------------------------------------------- */
  --tio-space-page-gutter-mobile: 1rem;
  --tio-space-page-gutter-tablet: 1.5rem;
  --tio-space-page-gutter-desktop: 2rem;

  /* Border Radius – Scale
     -------------------------------------------------------------------- */
  --tio-radius-none: 0;
  --tio-radius-sm: 0.25rem;
  --tio-radius-md: 0.5rem;
  --tio-radius-lg: 0.75rem;
  --tio-radius-xl: 1rem;
  --tio-radius-2xl: 1.5rem;
  --tio-radius-full: 9999px;

  /* Border Radius – Semantic
     -------------------------------------------------------------------- */
  --tio-radius-button: 0.75rem;
  --tio-radius-input: 0.5rem;
  --tio-radius-card: 1rem;
  --tio-radius-modal: 1.5rem;
  --tio-radius-badge: 9999px;

  /* Shadows – Scale
     -------------------------------------------------------------------- */
  --tio-shadow-none: none;
  --tio-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --tio-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --tio-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tio-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --tio-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  /* Shadows – Coloured
     -------------------------------------------------------------------- */
  --tio-shadow-primary: 0 4px 14px 0 rgb(48 217 204 / 0.3);
  --tio-shadow-secondary: 0 4px 14px 0 rgb(255 199 51 / 0.3);

  /* Shadows – Inner
     -------------------------------------------------------------------- */
  --tio-shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);

  /* Shadows – Semantic
     -------------------------------------------------------------------- */
  --tio-shadow-card: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --tio-shadow-card-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tio-shadow-dropdown: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --tio-shadow-modal: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --tio-shadow-button: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --tio-shadow-button-hover: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);

  /* Transitions – Durations
     -------------------------------------------------------------------- */
  --tio-duration-instant: 0ms;
  --tio-duration-fast: 150ms;
  --tio-duration-normal: 300ms;
  --tio-duration-slow: 500ms;
  --tio-duration-slower: 700ms;

  /* Transitions – Easings
     -------------------------------------------------------------------- */
  --tio-ease-linear: linear;
  --tio-ease-in: cubic-bezier(0.4, 0, 1, 1);
  --tio-ease-out: cubic-bezier(0, 0, 0.2, 1);
  --tio-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --tio-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Typography Utility Classes ----------------------------------------- */

.tio-wrap .tio-text-display {
  font-family: var(--tio-text-display-font-family);
  font-size: var(--tio-text-display-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: var(--tio-text-display-line-height);
  letter-spacing: var(--tio-text-display-letter-spacing);
}

.tio-wrap h1.tio-text-display {
  margin: 0;
  padding: 0;
}

.tio-wrap .tio-text-heading {
  font-family: var(--tio-text-heading-font-family);
  font-size: var(--tio-text-heading-font-size);
  font-style: normal;
  font-weight: 700;
  line-height: var(--tio-text-heading-line-height);
  letter-spacing: var(--tio-text-heading-letter-spacing);
}

.tio-wrap .tio-text-body-lg {
  font-family: var(--tio-text-body-lg-font-family);
  font-size: var(--tio-text-body-lg-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: var(--tio-text-body-lg-line-height);
  letter-spacing: var(--tio-text-body-lg-letter-spacing);
}

.tio-wrap .tio-text-body-md {
  font-family: var(--tio-text-body-md-font-family);
  font-size: var(--tio-text-body-md-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: var(--tio-text-body-md-line-height);
  letter-spacing: var(--tio-text-body-md-letter-spacing);
}

.tio-wrap .tio-text-body-sm {
  font-family: var(--tio-text-body-sm-font-family);
  font-size: var(--tio-text-body-sm-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: var(--tio-text-body-sm-line-height);
  letter-spacing: var(--tio-text-body-sm-letter-spacing);
}

.tio-wrap .tio-text-label {
  font-family: var(--tio-text-label-font-family);
  font-size: var(--tio-text-label-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: var(--tio-text-label-line-height);
  letter-spacing: var(--tio-text-label-letter-spacing);
}

.tio-wrap .tio-text-caption {
  font-family: var(--tio-text-caption-font-family);
  font-size: var(--tio-text-caption-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: var(--tio-text-caption-line-height);
  letter-spacing: var(--tio-text-caption-letter-spacing);
  text-transform: uppercase;
}

.tio-wrap .tio-text-key {
  font-family: var(--tio-text-key-font-family);
  font-size: var(--tio-text-key-font-size);
  font-style: normal;
  font-weight: 400;
  line-height: var(--tio-text-key-line-height);
  letter-spacing: var(--tio-text-key-letter-spacing);
  text-transform: uppercase;
}

/* --- Key Display Component ---------------------------------------------- */

.tio-wrap .tio-key-segments {
  display: flex;
  align-items: center;
  gap: var(--tio-space-3);
}

.tio-wrap .tio-key-divider {
  width: 16px;
  height: 4px;
  border-radius: var(--tio-radius-full);
  background-color: var(--tio-colour-sys-primary);
}

.tio-wrap .tio-key-masked {
  display: flex;
  align-items: center;
  gap: var(--tio-space-1);
}

.tio-wrap .tio-key-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--tio-colour-sys-on-primary-container);
}

/* --- Loading & Utility States ------------------------------------------- */

.tio-wrap .tio-button.is-loading {
  opacity: 0.6;
  cursor: wait;
}

/* --- Footer Component --------------------------------------------------- */

.tio-wrap .tio-footer {
  display: flex;
  align-items: center;
  gap: var(--tio-space-2);
  padding-top: var(--tio-space-4);
}

.tio-wrap .tio-footer__item {
  font-family: var(--tio-text-body-sm-font-family);
  font-size: var(--tio-text-body-sm-font-size);
  line-height: var(--tio-text-body-sm-line-height);
  color: var(--tio-colour-sys-on-surface-alt);
}

.tio-wrap .tio-footer__item a {
  color: var(--tio-colour-sys-on-surface);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tio-wrap .tio-footer__item a:hover {
  color: var(--tio-colour-sys-primary);
}

.tio-wrap .tio-footer__sep {
  color: var(--tio-colour-sys-on-surface-alt);
  font-size: var(--tio-text-body-sm-font-size);
}

/* --- Loading & Utility States ------------------------------------------- */

.tio-hidden {
  display: none !important;
}
