@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
  --text: #0f172a;         /* slate-900 */
  --muted: #475569;        /* slate-600 */
  --muted-2: #64748b;      /* slate-500 */
  --border: #bfdbfe;       /* blue-200 */
  --border-2: #e2e8f0;     /* slate-200 */
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --accent: #2563eb;       /* blue-600 */
  --accent-hover: #1d4ed8; /* blue-700 */
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
}

body {
  background-image:
    radial-gradient(rgba(255,255,255,0.55) 1px, rgba(255,255,255,0) 1px),
    linear-gradient(180deg, #eaf1ff 0%, #9fb9ff 100%);
  background-size: 12px 12px, 100% 100%;
  background-attachment: fixed;
}

/* Fixed UNITH logo (top-left) */
.unith-corner {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  transition: background-color .15s ease;
}

.unith-corner:hover {
  background: rgba(255,255,255,0.24);
}

.unith-corner img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
}

.header {
  margin-top: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.brand h1 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.brand .subtitle {
  color: var(--muted);
  font-size: 13px;
}

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang button {
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.65);
  color: var(--muted);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 700;
}

.lang button[aria-pressed="true"] {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.main {
  margin: 18px auto 26px;
}

.hero {
  margin-top: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.hero h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.hero p {
  margin: 0;
  color: var(--muted);
}

.grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.card {
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0 0 14px; color: var(--muted); }

/* Primary button (shared) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(37, 99, 235, 0.25);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  transition: background-color .15s ease, opacity .15s ease, transform .05s ease;
}

.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn.is-enabled { opacity: 1; }

.btn.is-disabled,
.btn[disabled] {
  background: #60a5fa;
  opacity: .6;
  cursor: not-allowed;
}

/* Form basics */
.form {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.field input, .field textarea, .field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.9);
  color: var(--text);
}

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

/* Error ring */
.field-error {
  border-color:#ef4444 !important;
  box-shadow:0 0 0 2px rgba(239,68,68,.2) !important;
}

.field-error:focus {
  outline:none;
  border-color:#ef4444 !important;
  box-shadow:0 0 0 3px rgba(239,68,68,.35) !important;
}

/* Subcards + tabs (used in create-hr-interview.html) */
.subcard {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--border-2);
  border-radius: 0.75rem;
  padding: 1rem;
}

/* Head visual picker (create-hr-interview.html) */
.visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 768px) {
  .visual-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.visual-card {
  appearance: none;
  padding: 0;
  text-align: left;

  border: 1px solid var(--border-2);
  border-radius: 14px;
  background: rgba(255,255,255,0.9);
  overflow: hidden;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .15s ease, border-color .15s ease;
}

.visual-card:hover {
  box-shadow: 0 10px 24px rgba(2,10,36,0.10);
}

.visual-card.is-selected {
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.visual-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0b1020;
}

.visual-media img,
.visual-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.visual-meta {
  padding: 10px;
}

.visual-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.visual-sub {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

.tab {
  font-size: .875rem;
  font-weight: 700;
  padding: .35rem .7rem;
  border-radius: .6rem;
  border: 1px solid var(--border-2);
  cursor: pointer;
}

.tab-active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.tab-inactive {
  background: rgba(255,255,255,.7);
  color: var(--muted);
}

.footer {
  margin: 18px 0 28px;
  color: var(--muted-2);
  font-size: 12px;
}

/* Sticky helper for the right column (desktop) */
@media (min-width: 1024px) {
  .sticky-col { position: sticky; top: 1.5rem; }
}

/* HR Trainer (create-hr-interview.html) layout helpers */
.hr-trainer-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hr-trainer-main {
  flex: 1;
  /* Allow the whole page to scroll so sections below (previous interviews) are reachable. */
  overflow: visible;
}

@media (min-width: 768px) {
  /* Make both top panels the same visual height (and keep them visible while scrolling). */
  :root {
    --hr-trainer-panel-h: clamp(560px, calc(100vh - 260px), 860px);
  }

  .hr-trainer-left,
  .hr-trainer-right {
    height: var(--hr-trainer-panel-h);
  }

  /* Left: allow scrolling inside if form is longer. */
  .hr-trainer-left {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Right: keep the CTA panel the same height; hero fills it. */
  .hr-trainer-right {
    position: sticky;
    top: 1.5rem;
    align-self: start;
  }

  .hr-trainer-right > .bg-white\/80 {
    height: 100%;
  }

  #heroPreview {
    height: 100%;
  }
}

/* Hero preview background (behind CTA) */
.hr-hero {
  border-radius: 16px;
  overflow: hidden;
}

.hr-hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: none;
}

.hr-hero-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hr-hero-overlay {
  background:
    radial-gradient(800px 600px at 30% 20%, rgba(37,99,235,.35), transparent 60%),
    radial-gradient(700px 500px at 70% 80%, rgba(16,185,129,.22), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.45));
}

/* Previous interviews list (create-hr-interview.html) */
.previous-interviews-list {
  margin-top: 8px;
  display: grid;
  gap: 10px;
}

/* More "list"-like rows */
.previous-interview-card {
  display: grid;
  /* Bigger avatar column */
  grid-template-columns: 84px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  min-height: 96px;
}

.previous-interview-avatar {
  /* ~80% of the row height */
  width: 76px;
  height: 76px;
  border-radius: 14px;
  object-fit: cover;
  background: #0b1020;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.previous-interview-body {
  min-width: 0;
}

.previous-interview-title {
  font-weight: 900;
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.previous-interview-meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.previous-interview-desc {
  margin-top: 6px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text);
  opacity: 0.9;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.previous-interview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.previous-interview-link {
  display: flex;
  align-items: center;
  gap: 8px;
}

.previous-interview-pass {
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 900;
  color: var(--text);
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.10);
  white-space: nowrap;
  cursor: pointer;
}

.previous-interview-pass:hover {
  background: rgba(15, 23, 42, 0.09);
}

.previous-interview-pass[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.previous-interview-link-input {
  width: min(520px, 46vw);
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,0.95);
  font-size: 12px;
  color: var(--text);
}

.previous-interview-link-input:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.55);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.previous-interview-copy {
  padding: 8px 10px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 12px;
  color: var(--text);
  background: rgba(37, 99, 235, 0.10);
  border: 1px solid rgba(37, 99, 235, 0.25);
  cursor: pointer;
  white-space: nowrap;
}

.previous-interview-copy:hover {
  background: rgba(37, 99, 235, 0.16);
}

.previous-interview-copy[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.previous-interview-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 12px;
  color: #fff;
  background: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.25);
  text-decoration: none;
  white-space: nowrap;
}

.previous-interview-open:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

@media (max-width: 520px) {
  .previous-interview-card {
    grid-template-columns: 76px 1fr;
    align-items: start;
    min-height: 92px;
  }
  .previous-interview-avatar {
    width: 72px;
    height: 72px;
  }
  .previous-interview-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    margin-top: 6px;
    flex-wrap: wrap;
  }
  .previous-interview-link {
    width: 100%;
    flex-wrap: wrap;
  }
  .previous-interview-link-input {
    width: 100%;
  }
}
