/* Talentvisa - universal modal system: tests, contact, waitlist, lawyer, etc. */

.tv-mwrap {
  position: fixed; inset: 0; z-index: 250;
  display: none; align-items: flex-start; justify-content: center;
  background: rgba(8, 10, 18, 0.72); backdrop-filter: blur(6px);
  padding: 32px 16px; overflow-y: auto;
}
.tv-mwrap.open { display: flex; }
.tv-mcard {
  background: #fff; color: #1a1a1a; border-radius: 14px;
  width: 100%; max-width: 600px; margin: auto;
  position: relative; box-shadow: 0 30px 80px -20px rgba(0,0,0,0.45);
  animation: tvmIn 0.28s cubic-bezier(.2,.8,.2,1);
}
.tv-mwrap[data-size="lg"] .tv-mcard { max-width: 920px; }
.tv-mwrap[data-size="test"] .tv-mcard {
  max-width: 760px;
  /* Test modal adopts the sector theme so contrast is correct on dark
     sectors (tech, film) and light sectors (arts/arch/fashion/science). */
  background: var(--tv-bg, #fff);
  color: var(--tv-fg, #1a1a1a);
  border: 1px solid var(--tv-line, transparent);
}
@keyframes tvmIn {
  from { transform: translateY(20px) scale(0.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.tv-mclose {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,0.85); border: 1px solid #e7e2da; color: #555;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  font-size: 22px; line-height: 1; padding: 0;
  display: flex; align-items: center; justify-content: center;
  z-index: 5; transition: background 0.15s;
}
.tv-mclose:hover { background: #fff; color: #131644; }
/* Themed close button for the test modal, visible on dark backgrounds too */
.tv-mwrap[data-size="test"] .tv-mclose {
  background: var(--tv-bg-alt, rgba(255,255,255,0.08));
  border-color: var(--tv-line, rgba(255,255,255,0.12));
  color: var(--tv-fg, #555);
}
.tv-mwrap[data-size="test"] .tv-mclose:hover {
  background: var(--tv-accent-soft, var(--tv-bg-alt, #fff));
  color: var(--tv-fg, #131644);
}
.tv-mhead {
  padding: 28px 32px 8px; display: flex; gap: 16px; align-items: flex-start;
}
.tv-mhead-text { flex: 1; }
.tv-mhead h2 {
  font-family: 'Noto Serif', Georgia, serif; font-size: 26px; font-weight: 600;
  margin: 0 0 6px; line-height: 1.2; letter-spacing: -0.01em;
}
.tv-mhead p { margin: 0; color: #6b6b6b; font-size: 14px; line-height: 1.5; }
/* Themed header text inside the test modal */
.tv-mwrap[data-size="test"] .tv-mhead h2 { color: var(--tv-fg, #1a1a1a); }
.tv-mwrap[data-size="test"] .tv-mhead p { color: var(--tv-fg-soft, #6b6b6b); }
.tv-mwrap[data-size="test"] .tv-mhead .tv-pill {
  background: var(--tv-accent-soft, #e0e0ff);
  color: var(--tv-accent, #131644);
}
.tv-mwrap[data-size="test"] .tv-mfoot {
  border-top-color: var(--tv-line, #f0ece4);
}
.tv-mwrap[data-size="test"] .tv-mfoot small { color: var(--tv-fg-muted, #999); }
.tv-mwrap[data-size="test"] .tv-mcancel { color: var(--tv-fg-soft, #6b6b6b); }
.tv-mwrap[data-size="test"] .tv-mcancel:hover {
  color: var(--tv-fg, #131644);
  border-color: var(--tv-line, #e1ddd2);
}
.tv-mhead .tv-pill {
  display: inline-block; padding: 4px 10px; background: #e0e0ff; color: #131644;
  border-radius: 999px; font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 600;
}
.tv-mbody { padding: 18px 32px 28px; }
.tv-mbody.flush { padding: 0; }
.tv-mform { display: flex; flex-direction: column; gap: 14px; }
.tv-mform label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 600; color: #6b6b6b;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.tv-mform input, .tv-mform textarea, .tv-mform select {
  font-family: inherit; font-size: 16px; padding: 11px 14px;
  border: 1px solid #e1ddd2; border-radius: 8px;
  background: #fafaf6; color: #1a1a1a; transition: border-color 0.15s, background 0.15s;
}
.tv-mform input:focus, .tv-mform textarea:focus, .tv-mform select:focus {
  border-color: #131644; background: #fff; outline: 2px solid #e0e0ff;
}
.tv-mform textarea { min-height: 110px; resize: vertical; }
.tv-mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .tv-mrow { grid-template-columns: 1fr; } }
.tv-mform .consent { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 12px; text-transform: none; letter-spacing: 0; color: #6b6b6b; line-height: 1.5; font-weight: 400; }
.tv-mform .consent input { width: auto; margin-top: 2px; }

/* Modal CV hint + file row */
.tv-mhint {
  background: #f7f3ee;
  border-left: 3px solid #131644;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
  margin: 4px 0;
}
.tv-mhint strong { color: #131644; display: inline; font-weight: 600; }
.tv-mfile {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--tv-font-label, 'JetBrains Mono', monospace);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #777;
}
.tv-mfile-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: #fafaf6;
  border: 1px dashed #d8d4cc;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  text-transform: none;
  letter-spacing: 0;
}
.tv-mfile-wrap:hover { border-color: #131644; }
.tv-mfile-wrap input[type=file] {
  font-family: inherit; font-size: 13px;
  color: #555;
  max-width: 220px;
}
.tv-mfile-status {
  flex: 1;
  font-size: 12px;
  color: #999;
}
.tv-mfile-status.is-set { color: #131644; font-weight: 600; }
.tv-mfile-status.is-err { color: #c4504a; font-weight: 600; }
.tv-mfoot {
  padding: 16px 32px 24px; display: flex; gap: 10px;
  align-items: center; justify-content: space-between; flex-wrap: wrap;
  border-top: 1px solid #f0ece4;
}
.tv-mfoot small { color: #999; font-size: 11px; }
.tv-mfoot .tv-mactions { display: flex; gap: 10px; flex-wrap: wrap; }
.tv-msubmit {
  background: #131644; color: #fff; border: 0; padding: 12px 24px;
  border-radius: 999px; font-family: inherit; font-size: 13px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer;
  transition: background 0.15s;
}
.tv-msubmit:hover { background: #1f2466; }
.tv-msubmit[disabled] { opacity: 0.6; cursor: wait; }
.tv-mcancel {
  background: transparent; color: #6b6b6b; border: 1px solid transparent;
  padding: 12px 16px; border-radius: 999px; cursor: pointer; font-family: inherit;
  font-size: 13px; letter-spacing: 0.04em;
}
.tv-mcancel:hover { color: #131644; border-color: #e1ddd2; }
.tv-mok {
  background: rgba(43,196,138,0.12); color: #1e8a5e;
  border-radius: 8px; padding: 14px 18px; font-size: 14px; line-height: 1.5;
}
.tv-mfail {
  background: rgba(220,38,38,0.08); color: #b91c1c;
  border-radius: 8px; padding: 14px 18px; font-size: 14px; line-height: 1.5;
}
@media (max-width: 540px) {
  .tv-mhead, .tv-mbody, .tv-mfoot { padding-left: 20px; padding-right: 20px; }
  .tv-mhead h2 { font-size: 22px; }
}

/* Test runner inside modal */
.tv-mwrap[data-size="test"] .tv-mbody { padding-top: 20px; }
.tv-test-launch-section { padding: 64px 0; text-align: center; }
.tv-test-launch-section .tv-pill { display: inline-block; margin-bottom: 16px; }
.tv-test-launch-section h2 { font-family: 'Noto Serif', Georgia, serif; font-size: clamp(32px, 5vw, 48px); margin: 0 0 12px; }
.tv-test-launch-section p { max-width: 56ch; margin: 0 auto 24px; font-size: 16px; color: #555; line-height: 1.6; }
.tv-test-launch-section button {
  background: #131644; color: #fff; border: 0; padding: 18px 32px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 999px; cursor: pointer; transition: transform 0.15s, background 0.15s;
}
.tv-test-launch-section button:hover { background: #1f2466; transform: translateY(-2px); }
.tv-test-launch-section .meta { margin-top: 14px; font-size: 13px; color: #888; }
