/* Shared design tokens and components for Language Proficiency Practice Tests. */
:where(.it-app) .card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 14px 16px;
}

.it-libcard, .rp-recent, .rc-card {
  position: relative; text-align: left; appearance: none; cursor: pointer; font-family: inherit;
  color: var(--text); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 12px 13px; transition: border-color 120ms, transform 80ms;
}
.it-libcard:hover, .rp-recent:hover, .rc-card:hover { border-color: var(--accent); transform: translateY(-1px); }

.it-libcard-title, .rp-r-title {
  font-size: 13.5px; font-weight: 700; margin: 0 22px 5px 0; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

:where(.it-app) .pill-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
:where(.it-app) .pill {
  display: inline-flex; align-items: center; gap: 6px; appearance: none;
  font: inherit; font-size: 0.75rem; font-weight: 700; line-height: 1.35;
  padding: 4px 13px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: #fff; color: var(--text);
  cursor: pointer; transition: background 0.12s, border-color 0.12s, opacity 0.12s;
}
:where(.it-app) .pill:hover { border-color: #c3ccdf; background: #f7f9fe; }
:where(.it-app) .pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }
:where(.it-app) .pill.off { opacity: 0.42; }
:where(.it-app) .pill.off:hover { opacity: 0.75; }
:where(.it-app) .pill-sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; flex: 0 0 auto; }
:where(.it-app) .pill.on .pill-sw { box-shadow: 0 0 0 1.5px #fff; }

:where(.it-app) button.btn {
  border: none; border-radius: var(--radius-btn); padding: 8px 16px; font-weight: 700; font-size: 0.86rem;
  cursor: pointer; background: var(--accent); color: #fff;
}
:where(.it-app) button.btn:hover { opacity: 0.92; }
:where(.it-app) button.btn:disabled { opacity: 0.5; cursor: not-allowed; }
:where(.it-app) button.btn.secondary { background: #e4e8f1; color: var(--text); }

:where(.it-app) button.btn.danger { background: var(--danger-text); border-color: var(--danger-text); color: #fff; }
:where(.it-app) button.btn.danger:hover:not(:disabled) { opacity: 0.88; }
:where(.it-app) button.btn.sm { padding: 5px 12px; font-size: 0.78rem; }
:where(.it-app) button.btn.lg { padding: 14px 20px; font-size: 1.05rem; }

:where(.it-app) button.btn.axis-search {
  display: inline-flex; align-items: center; gap: 5px; max-width: 210px;
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  padding: 2px 6px 2px 4px; font-weight: 400; font-size: var(--fs-md);
}
:where(.it-app) button.btn.axis-search:hover:not(:disabled) { opacity: 1; border-color: var(--accent); }
:where(.it-app) button.btn.axis-search:focus-visible,
:where(.it-app) button.btn.axis-search.pace-axis-search-active { outline: none; border-color: var(--accent); }

:where(.it-app) a.btn {
  border: none; border-radius: var(--radius-btn); padding: 8px 16px; font-weight: 700; font-size: 0.86rem;
  cursor: pointer; background: var(--accent); color: #fff;
  text-decoration: none; display: inline-block; line-height: normal;
}
:where(.it-app) a.btn:hover { opacity: 0.92; }
:where(.it-app) a.btn.secondary { background: #e4e8f1; color: var(--text); }
:where(.it-app) a.btn.danger { background: var(--danger-text); border-color: var(--danger-text); color: #fff; }
:where(.it-app) a.btn.sm { padding: 5px 12px; font-size: 0.78rem; }
:where(.it-app) a.btn.lg { padding: 14px 20px; font-size: 1.05rem; }

.it-log-btn {
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-btn) !important;
  padding: 8px 16px !important;
  font-weight: 700 !important;
  font-size: 0.86rem !important;
}
.it-log-btn:hover { opacity: 0.92; }
.it-log-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.wp-sw { display: flex; align-items: center; gap: 7px; font-size: 0.98rem; }
.wp-sw[hidden] { display: none; }
.wp-sw b { color: var(--accent); font-variant-numeric: tabular-nums; cursor: pointer; font-size: 1.08em; font-weight: 800; }
.wp-sw-edit {
  width: 5.5em; font: inherit; font-variant-numeric: tabular-nums; color: var(--accent);
  padding: 0 4px; border: 1px solid var(--accent); border-radius: 5px; background: #fff;
}
.wp-sw-btn {
  appearance: none; cursor: pointer; font-family: inherit; font-size: 0.82rem; font-weight: 700;
  color: var(--muted); background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 4px 9px; line-height: 1.4; transition: background 120ms, color 120ms, border-color 120ms;
}
.wp-sw-btn:hover { color: var(--accent); border-color: var(--accent); }
.wp-sw-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.wp-sw-btn.wp-on { background: var(--accent); color: #fff; border-color: var(--accent); }

.it-gate, .wp-clock-gate, .rp-clock-gate {
  position: absolute; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: rgba(10,14,24,0.45); cursor: pointer;
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
}
.it-gate.it-on { display: flex; }
.it-start-pill, .wp-clock-gate-btn, .rp-clock-gate-btn, .wp-peek-begin {
  appearance: none; border: 0; cursor: pointer;
  background: var(--accent); color: #fff;
  font-size: 15px; font-weight: 700; line-height: 1;
  padding: 12px 26px; border-radius: var(--radius-pill);
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
}
.it-start-pill:hover, .wp-clock-gate-btn:hover, .rp-clock-gate-btn:hover, .wp-peek-begin:hover { filter: brightness(1.08); }
.it-start-pill:focus-visible, .wp-clock-gate-btn:focus-visible, .rp-clock-gate-btn:focus-visible,
.wp-peek-begin:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.it-back, .rc-back-btn {
  border: none; background: transparent;
  color: var(--accent); font-size: 0.85rem; cursor: pointer; padding: 4px 0 10px;

  display: inline-block; font-family: Arial, sans-serif; line-height: normal; text-decoration: none;
}

.it-logcard, .rc-logcard, .np-logcard {
  margin-top: 14px; border: 1px solid var(--border); border-radius: 14px;
  background: var(--card); padding: 16px 18px;
}

.it-popup {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
}

.it-close, .rc-card-remove {
  width: 22px; height: 22px;
  border: none; background: transparent; color: var(--muted); font-size: 16px;
  cursor: pointer; line-height: 1;
}
.it-close:hover, .rc-card-remove:hover { color: var(--accent-2); }

.it-close-dark {
  width: 22px; height: 22px; border: none; border-radius: 999px;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 13px;
  cursor: pointer; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.it-close-dark:hover { background: rgba(0,0,0,0.75); }

.it-log-confirm {
  font-size: 0.8rem; font-weight: 600; color: var(--good); margin-top: 6px;
  min-height: 1em; opacity: 0; transition: opacity 0.25s ease;
}
.it-log-confirm.it-log-confirm-in { opacity: 1; }
.it-log-confirm .it-log-confirm-undo { color: var(--accent); font-weight: 700; text-decoration: none; margin-left: 4px; }
.it-log-confirm .it-log-confirm-undo:hover { text-decoration: underline; }

.it-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 10px 16px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop); font-size: 0.85rem; font-weight: 600; z-index: 100001;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease; max-width: 80vw;
}
.it-toast.it-toast-in { opacity: 1; }
.it-toast.it-toast-err { background: var(--danger); }
