/* ==========================================================================
   TranscodeX — Converter / Compressor application UI
   Requires design-tokens.css + main.css
   ========================================================================== */

.tx-app { max-width: 940px; margin: 0 auto; position: relative; }

/* Stepper --------------------------------------------------------------- */

.tx-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.tx-step-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 10px;
  border-radius: var(--tx-radius-pill);
  background: var(--tx-surface);
  border: 1px solid var(--tx-line);
  color: var(--tx-ink-3);
  font-size: var(--tx-fs-xs);
  font-weight: 800;
  transition: transform var(--tx-t) var(--tx-ease), color var(--tx-t), border-color var(--tx-t);
}

.tx-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--tx-surface-2);
  color: var(--tx-ink-3);
}

.tx-step-chip.tx-step--active {
  color: #fff;
  background: var(--tx-grad-brand);
  border-color: transparent;
  box-shadow: 0 6px 14px -6px rgba(109, 74, 255, 0.7);
  transform: translateY(-2px);
}

.tx-step-chip.tx-step--active .tx-step-num { background: rgba(255, 255, 255, 0.24); color: #fff; }

.tx-step-chip.tx-step--done { color: var(--tx-success-ink); border-color: #bfe9d6; }
.tx-step-chip.tx-step--done .tx-step-num { background: var(--tx-accent); color: #fff; }

.tx-step-link {
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--tx-line-strong) 0 5px, transparent 5px 10px);
  margin: 0;
}

/* Engine status --------------------------------------------------------- */

.tx-engine-status { margin-bottom: 20px; }

.tx-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--tx-radius-pill);
  border: 1px solid var(--tx-line);
  background: var(--tx-surface);
  box-shadow: 0 2px 0 rgba(43, 37, 64, 0.05);
  font-size: var(--tx-fs-sm);
  font-weight: 700;
  color: var(--tx-ink-2);
}

.tx-status--ready { background: var(--tx-surface-mint); border-color: #bfe9d6; color: #1f7a55; }
.tx-status--loading { color: var(--tx-ink-2); }
.tx-status--error {
  border-color: #f3c6d1;
  background: #fff1f5;
  color: var(--tx-error);
  border-radius: var(--tx-radius-lg);
  flex-direction: column;
  align-items: flex-start;
}
.tx-status--error p { margin: 4px 0; }
.tx-status--error details { color: var(--tx-ink-2); font-size: var(--tx-fs-xs); }
.tx-status--error summary { cursor: pointer; font-weight: 800; }
.tx-status--error pre {
  font-family: var(--tx-mono);
  white-space: pre-wrap;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--tx-radius-sm);
  padding: 10px 12px;
  overflow-x: auto;
}

.tx-spinner {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(109, 74, 255, 0.2);
  border-top-color: var(--tx-primary);
  border-radius: 50%;
  animation: txSpin 0.8s linear infinite;
  flex: none;
}

@keyframes txSpin { to { transform: rotate(360deg); } }

.tx-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.tx-dot--green { background: var(--tx-accent); box-shadow: 0 0 0 4px rgba(63, 201, 148, 0.2); }

.tx-engine-version {
  margin-left: auto;
  opacity: 0.8;
  font-family: var(--tx-mono);
  font-size: 0.76rem;
}

/* Dropzone -------------------------------------------------------------- */

.tx-dropzone {
  position: relative;
  overflow: hidden;
  border: 2.5px dashed var(--tx-line-strong);
  border-radius: var(--tx-radius-xl);
  background:
    radial-gradient(420px 220px at 50% 0%, rgba(155, 123, 255, 0.16), transparent 70%),
    var(--tx-surface-2);
  padding: 56px 26px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--tx-t) var(--tx-ease-out), background var(--tx-t) var(--tx-ease-out),
              box-shadow var(--tx-t) var(--tx-ease-out), transform var(--tx-t) var(--tx-ease);
}

.tx-dropzone:hover,
.tx-dropzone:focus-visible,
.tx-dropzone--over {
  border-color: var(--tx-primary);
  background:
    radial-gradient(460px 240px at 50% 0%, rgba(155, 123, 255, 0.26), transparent 70%),
    var(--tx-surface-lilac);
  box-shadow: var(--tx-ring), 0 24px 46px -26px rgba(109, 74, 255, 0.6);
}

.tx-dropzone--over { transform: scale(1.012); }

.tx-dropzone-art {
  width: 150px;
  margin: 0 auto 16px;
  animation: txFloat 5.5s ease-in-out infinite;
  pointer-events: none;
}

.tx-dropzone-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tx-grad-brand);
  color: #fff;
  box-shadow: var(--tx-shadow-pop), 0 18px 30px -18px rgba(109, 74, 255, 0.9);
}

.tx-dropzone-title {
  font-family: var(--tx-font-display);
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  margin-bottom: 6px;
}

.tx-dropzone-sub { color: var(--tx-ink-3); font-size: var(--tx-fs-sm); margin: 0 0 18px; }

.tx-dropzone-formats {
  color: var(--tx-ink-3);
  font-size: var(--tx-fs-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-top: 18px;
}

.tx-privacy-note {
  margin: 20px auto 0;
  max-width: 620px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--tx-ink-2);
  font-size: var(--tx-fs-sm);
  font-weight: 600;
}

.tx-privacy-note svg { flex: none; color: var(--tx-accent); }

/* Notifications --------------------------------------------------------- */

.tx-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  max-width: 560px;
  width: calc(100% - 48px);
  padding: 15px 22px;
  border-radius: var(--tx-radius-pill);
  border: 1px solid var(--tx-line);
  background: var(--tx-surface);
  color: var(--tx-ink);
  font-size: var(--tx-fs-sm);
  font-weight: 700;
  text-align: center;
  box-shadow: var(--tx-shadow-lift);
  animation: txSlideUp var(--tx-t) var(--tx-ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

@keyframes txSlideUp {
  from { transform: translate(-50%, 16px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.tx-notification--error { background: #fff1f5; border-color: #f3c6d1; color: var(--tx-error); }
.tx-notification--info { background: var(--tx-surface-lilac); border-color: #ded1ff; }

/* App card wrapper ------------------------------------------------------ */

.tx-app-card {
  border-radius: var(--tx-radius-xl);
  border: 1px solid var(--tx-line);
  background: var(--tx-surface);
  box-shadow: var(--tx-shadow-soft);
  padding: 32px;
}

/* File info + metadata -------------------------------------------------- */

.tx-file-name {
  font-family: var(--tx-font-display);
  font-weight: 800;
  font-size: 1.3rem;
  word-break: break-all;
  line-height: 1.2;
}

.tx-file-meta { display: flex; gap: 14px; color: var(--tx-ink-3); font-size: var(--tx-fs-sm); margin-top: 6px; }

.tx-metadata { margin-top: 18px; }

.tx-meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.tx-meta-item {
  padding: 14px 16px;
  border-radius: var(--tx-radius-md);
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tx-meta-item .tx-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tx-ink-3);
  font-weight: 800;
}

.tx-meta-item > span:last-child { font-weight: 800; font-size: var(--tx-fs-sm); }

.tx-video-preview {
  width: 100%;
  max-height: 440px;
  border-radius: var(--tx-radius-lg);
  background: #16121f;
  display: block;
  margin-top: 18px;
  border: 1px solid var(--tx-line);
  box-shadow: var(--tx-shadow-soft);
}

/* Presets --------------------------------------------------------------- */

.tx-preset-group { margin-bottom: 26px; }

.tx-preset-group-title {
  font-size: var(--tx-fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tx-ink-3);
  margin-bottom: 12px;
  font-weight: 800;
}

.tx-preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.tx-preset {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  text-align: left;
  padding: 16px;
  border-radius: var(--tx-radius-lg);
  border: 1.5px solid var(--tx-line);
  background: var(--tx-surface);
  color: var(--tx-ink);
  cursor: pointer;
  font-family: var(--tx-font);
  transition: border-color var(--tx-t), background var(--tx-t), transform var(--tx-t) var(--tx-ease),
              box-shadow var(--tx-t) var(--tx-ease-out);
}

.tx-preset:hover { border-color: var(--tx-primary-2); transform: translateY(-4px); box-shadow: var(--tx-shadow-soft); }

.tx-preset--active {
  border-color: var(--tx-primary);
  background: var(--tx-surface-lilac);
  box-shadow: var(--tx-ring);
}

.tx-preset-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  position: relative;
  flex: none;
}

.tx-preset-icon--default::before {
  content: '';
  position: absolute;
  inset: auto 10px 11px 10px;
  height: 7px;
  border-radius: 4px;
  background: var(--tx-grad-brand);
}

.tx-preset-icon--ig::before {
  content: '';
  position: absolute;
  inset: 10px auto auto 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 6px;
  border: 2.5px solid var(--tx-pink);
}

.tx-preset-icon--tt::before {
  content: '';
  position: absolute;
  inset: 11px auto auto 50%;
  width: 13px;
  height: 15px;
  margin-left: -6px;
  border-radius: 3px;
  background: var(--tx-ink);
  box-shadow: 3px 3px 0 -1px var(--tx-secondary), -3px -3px 0 -1px var(--tx-accent);
  transform: rotate(-6deg);
}

.tx-preset-icon--yt::before {
  content: '';
  position: absolute;
  inset: 11px auto auto 50%;
  width: 20px;
  height: 14px;
  margin-left: -10px;
  border-radius: 5px;
  background: #ff5a5a;
}
.tx-preset-icon--yt::after {
  content: '';
  position: absolute;
  inset: 14px auto auto 50%;
  margin-left: -3px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #fff;
}

.tx-preset-icon--wa::before {
  content: '';
  position: absolute;
  inset: 10px auto auto 50%;
  width: 19px;
  height: 19px;
  margin-left: -9px;
  border-radius: 50%;
  background: var(--tx-accent);
}

.tx-preset-icon--sq::before {
  content: '';
  position: absolute;
  inset: 10px auto auto 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 5px;
  background: var(--tx-secondary);
}

.tx-preset-icon--lnd::before {
  content: '';
  position: absolute;
  inset: 13px 9px 13px 9px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--tx-warm) 0 45%, var(--tx-highlight) 45% 100%);
}

.tx-preset-name { font-weight: 800; font-size: var(--tx-fs-sm); }
.tx-preset-desc { color: var(--tx-ink-3); font-size: 0.78rem; line-height: 1.4; margin: 0; }

.tx-preset-summary-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 22px;
  flex-wrap: wrap;
}

.tx-preset-summary {
  color: var(--tx-primary-deep);
  background: var(--tx-surface-lilac);
  border-radius: var(--tx-radius-pill);
  padding: 8px 16px;
  font-size: var(--tx-fs-sm);
  font-weight: 800;
}
.tx-preset-summary:empty { display: none; }

/* Advanced toggle ------------------------------------------------------- */

.tx-advanced-toggle {
  background: var(--tx-surface);
  border: 1.5px solid var(--tx-line-strong);
  color: var(--tx-ink-2);
  font-family: var(--tx-font);
  font-size: var(--tx-fs-sm);
  font-weight: 800;
  padding: 11px 18px;
  border-radius: var(--tx-radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color var(--tx-t), border-color var(--tx-t), background var(--tx-t), transform var(--tx-t) var(--tx-ease);
}

.tx-advanced-toggle:hover { color: var(--tx-primary-deep); border-color: var(--tx-primary-2); transform: translateY(-1px); }

.tx-advanced-toggle .tx-chev { transition: transform var(--tx-t) var(--tx-ease); }
.tx-advanced-toggle[aria-expanded="true"] .tx-chev { transform: rotate(180deg); }

/* Settings form --------------------------------------------------------- */

.tx-settings { margin-top: 22px; padding-top: 22px; border-top: 1px dashed var(--tx-line-strong); }

.tx-settings-section { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 22px; }

.tx-field { display: flex; flex-direction: column; gap: 7px; }

.tx-field label { font-size: var(--tx-fs-xs); font-weight: 800; color: var(--tx-ink-2); }

.tx-field select,
.tx-field input[type="number"],
.tx-field input[type="text"] {
  -webkit-appearance: none;
  appearance: none;
  background: var(--tx-surface-2);
  border: 1.5px solid var(--tx-line-strong);
  color: var(--tx-ink);
  font-family: var(--tx-font);
  font-size: var(--tx-fs-sm);
  font-weight: 600;
  padding: 12px 14px;
  border-radius: var(--tx-radius-md);
  width: 100%;
  transition: border-color var(--tx-t), box-shadow var(--tx-t), background var(--tx-t);
}

.tx-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235a5470' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.tx-field select:focus,
.tx-field input:focus {
  outline: none;
  background: var(--tx-surface);
  border-color: var(--tx-primary);
  box-shadow: var(--tx-ring);
}

.tx-field-hint { color: var(--tx-ink-3); font-size: 0.78rem; }
.tx-hint--error { color: var(--tx-error); font-weight: 800; }
.tx-field-row { display: flex; gap: 10px; }

/* Action bar ------------------------------------------------------------ */

.tx-actions { display: flex; align-items: center; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.tx-actions .tx-spacer { flex: 1; }
.tx-actions--center { justify-content: center; }

.tx-result-badge {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3fc994, #2fae7f);
  color: #fff;
  box-shadow: 0 16px 28px -14px rgba(63, 201, 148, 0.9);
}

.tx-result-badge svg { width: 30px; height: 30px; }

.tx-start-btn { min-width: 210px; padding: 15px 30px; font-size: 1.02rem; }

.tx-btn--busy { pointer-events: none; opacity: 0.9; }

.tx-btn--busy::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: txSpin 0.8s linear infinite;
  flex: none;
}

.tx-link-btn {
  background: none;
  border: none;
  color: var(--tx-ink-3);
  font-family: var(--tx-font);
  font-size: var(--tx-fs-sm);
  font-weight: 800;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--tx-radius-pill);
}
.tx-link-btn:hover { color: var(--tx-primary-deep); background: var(--tx-surface-lilac); }

/* Processing ------------------------------------------------------------ */

.tx-processing { text-align: center; padding: 46px 26px; }

.tx-processing-char {
  width: 128px;
  margin: 0 auto 18px;
  animation: txFloat 3.6s ease-in-out infinite;
  pointer-events: none;
}

.tx-processing-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--tx-font-display);
  font-weight: 800;
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.tx-processing-local { color: var(--tx-ink-3); font-size: var(--tx-fs-sm); margin-bottom: 26px; }

.tx-progress-track {
  height: 16px;
  border-radius: var(--tx-radius-pill);
  background: var(--tx-surface-2);
  overflow: hidden;
  border: 1px solid var(--tx-line);
  max-width: 560px;
  margin: 0 auto;
}

.tx-progress-fill {
  height: 100%;
  width: 0;
  border-radius: var(--tx-radius-pill);
  background: var(--tx-grad-brand);
  transition: width var(--tx-t) var(--tx-ease-out);
  position: relative;
  overflow: hidden;
}

.tx-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: txShimmer 1.6s linear infinite;
}

@keyframes txShimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.tx-progress-label {
  margin-top: 18px;
  font-family: var(--tx-font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1;
}

.tx-progress-time { color: var(--tx-ink-3); font-size: var(--tx-fs-sm); font-weight: 700; margin-top: 6px; }

.tx-processing-note { color: var(--tx-ink-3); font-size: var(--tx-fs-xs); margin: 24px auto 0; max-width: 440px; }

/* Result ---------------------------------------------------------------- */

.tx-result-head {
  font-family: var(--tx-font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  font-weight: 800;
  margin-bottom: 6px;
}

.tx-result-sub { color: var(--tx-ink-2); margin-bottom: 24px; }

.tx-result-badge {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tx-grad-mint);
  color: #fff;
  box-shadow: var(--tx-shadow-pop-mint);
  margin-bottom: 18px;
  animation: txPop 0.5s var(--tx-ease) both;
}

@keyframes txPop {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.tx-result-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 26px; }

.tx-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 18px;
  border-radius: var(--tx-radius-md);
  background: var(--tx-surface-2);
  border: 1px solid var(--tx-line);
  font-size: var(--tx-fs-sm);
}

.tx-stat-row span:first-child { color: var(--tx-ink-3); font-weight: 700; }
.tx-stat-row span:last-child { font-weight: 800; }

.tx-stat-row--highlight {
  border-color: #bfe9d6;
  background: var(--tx-surface-mint);
  grid-column: 1 / -1;
}

.tx-stat-row--highlight span:first-child { color: #1f7a55; }
.tx-stat-row--highlight span:last-child { color: #1f7a55; font-size: 1.35rem; }

.tx-btn--download { text-decoration: none; font-size: 1rem; }

/* Compressor levels ----------------------------------------------------- */

.tx-levels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 24px; }

.tx-level {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 20px;
  border-radius: var(--tx-radius-lg);
  border: 1.5px solid var(--tx-line);
  background: var(--tx-surface-2);
  color: var(--tx-ink);
  font-family: var(--tx-font);
  cursor: pointer;
  transition: border-color var(--tx-t), background var(--tx-t), transform var(--tx-t) var(--tx-ease),
              box-shadow var(--tx-t) var(--tx-ease-out);
}

.tx-level:hover { transform: translateY(-3px); border-color: var(--tx-primary-2); box-shadow: var(--tx-shadow-soft); }

.tx-level[data-compression-level="high"] { background: var(--tx-surface-mint); }
.tx-level[data-compression-level="balanced"] { background: var(--tx-surface-lilac); }
.tx-level[data-compression-level="small"] { background: var(--tx-surface-butter); }
.tx-level[data-compression-level="maximum"] { background: var(--tx-surface-peach); }

.tx-level--active {
  border-color: var(--tx-primary);
  box-shadow: var(--tx-ring);
  transform: translateY(-3px);
}

.tx-level-name { font-family: var(--tx-font-display); font-weight: 800; font-size: 1.08rem; }
.tx-level-desc { color: var(--tx-ink-2); font-size: 0.84rem; margin: 0; }

.tx-level-meter { display: flex; gap: 5px; margin-top: 10px; }

.tx-level-meter span {
  height: 6px;
  flex: 1;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.65);
}

.tx-level[data-compression-level="high"] .tx-level-meter span:nth-last-child(n+3) { background: var(--tx-grad-brand); }
.tx-level[data-compression-level="balanced"] .tx-level-meter span:nth-last-child(n+2) { background: var(--tx-grad-brand); }
.tx-level[data-compression-level="small"] .tx-level-meter span:not(:last-child) { background: var(--tx-grad-brand); }
.tx-level[data-compression-level="maximum"] .tx-level-meter span { background: var(--tx-grad-brand); }

.tx-level--active .tx-level-meter span { filter: saturate(1.15); }

.tx-subhead {
  margin: 26px 0 14px;
  font-family: var(--tx-font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

/* Codec cards ------------------------------------------------------------ */

.tx-codec-section { margin-top: 30px; }
.tx-codec-section .tx-subhead { margin-bottom: 12px; }

.tx-codec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tx-codec {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  padding: 16px;
  border-radius: var(--tx-radius-lg);
  border: 1.5px solid var(--tx-line);
  background: var(--tx-surface);
  color: var(--tx-ink);
  font-family: var(--tx-font);
  cursor: pointer;
  transition: border-color var(--tx-t), background var(--tx-t), transform var(--tx-t) var(--tx-ease),
              box-shadow var(--tx-t) var(--tx-ease-out);
}

.tx-codec:hover:not(:disabled) { border-color: var(--tx-primary-2); transform: translateY(-3px); box-shadow: var(--tx-shadow-soft); }

.tx-codec--active { border-color: var(--tx-primary); background: var(--tx-surface-lilac); box-shadow: var(--tx-ring); }

.tx-codec--disabled { opacity: 0.55; cursor: not-allowed; }

.tx-codec-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tx-codec-name { font-family: var(--tx-font-display); font-weight: 800; font-size: 1.05rem; }

.tx-codec-reco {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a4d00;
  background: var(--tx-surface-butter);
  border: 1px solid #f3dd9c;
  border-radius: var(--tx-radius-pill);
  padding: 3px 9px;
  white-space: nowrap;
}

.tx-codec-tag { color: var(--tx-ink-3); font-size: 0.78rem; line-height: 1.4; margin: 0; }

.tx-codec-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

.tx-codec-status {
  font-size: 0.68rem;
  font-weight: 800;
  border-radius: var(--tx-radius-pill);
  padding: 3px 9px;
}

.tx-codec-status[data-status="checking"] { color: var(--tx-ink-2); background: var(--tx-surface-2); }
.tx-codec-status[data-status="supported"] { color: #1f7a55; background: var(--tx-surface-mint); }
.tx-codec-status[data-status="missing"] { color: var(--tx-error); background: #fff1f5; }

.tx-codec-format {
  color: var(--tx-ink-3);
  font-family: var(--tx-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.tx-codec-summary {
  display: inline-block;
  margin-top: 14px;
  color: var(--tx-primary-deep);
  background: var(--tx-surface-lilac);
  border-radius: var(--tx-radius-pill);
  padding: 8px 16px;
  font-size: var(--tx-fs-sm);
  font-weight: 800;
}
.tx-codec-summary:empty { display: none; }

.tx-codec-note { color: var(--tx-ink-3); font-size: 0.8rem; line-height: 1.5; margin-top: 10px; max-width: 640px; }
.tx-codec-note:empty { display: none; }

.tx-notification-action {
  background: var(--tx-grad-brand);
  color: #fff;
  border: none;
  font-family: var(--tx-font);
  font-size: var(--tx-fs-sm);
  font-weight: 800;
  padding: 8px 16px;
  border-radius: var(--tx-radius-pill);
  cursor: pointer;
  flex: none;
}

@media (max-width: 720px) {
  .tx-codec-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .tx-codec-grid { grid-template-columns: 1fr; }
}
