/* Career Compass — multilingual UI (language switch, notices, small layout fixes) */

/* Top bar that hosts the language switch (right-aligned on all screen sizes) */
.cc-topbar { display: flex; justify-content: flex-end; align-items: center; gap: 12px; width: 100%; margin: 0 0 18px; }
.cc-topbar--overlay { position: absolute; top: 16px; right: 16px; width: auto; margin: 0; z-index: 1001; }

/* Segmented control: 한국어 | English */
.cc-lang {
  display: inline-flex; align-items: stretch; gap: 2px; padding: 3px;
  border-radius: 999px; background: rgba(8, 20, 38, 0.55);
  border: 1px solid rgba(74, 158, 255, 0.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: 'Noto Sans KR', 'Segoe UI', Roboto, Arial, sans-serif;
  line-height: 1; white-space: nowrap;
}
.cc-lang-opt {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 72px; min-height: 34px; padding: 8px 14px; border-radius: 999px;
  color: #dbeafe; text-decoration: none; font-size: 0.88rem; font-weight: 700;
  transition: background .2s ease, color .2s ease;
}
.cc-lang-opt:hover { background: rgba(74, 158, 255, 0.18); color: #fff; }
.cc-lang-opt.is-active { background: linear-gradient(135deg, #4a9eff 0%, #00a6ff 100%); color: #fff; box-shadow: 0 2px 10px rgba(74, 158, 255, 0.35); }
.cc-lang-opt:focus-visible { outline: 3px solid #facc15; outline-offset: 2px; }

/* Light variant (on white headers) */
.cc-lang--light { background: #f1f5f9; border-color: #e2e8f0; }
.cc-lang--light .cc-lang-opt { color: #334155; }
.cc-lang--light .cc-lang-opt:hover { background: #e2e8f0; color: #0f172a; }
.cc-lang--light .cc-lang-opt.is-active { background: #1d4ed8; color: #fff; box-shadow: none; }

@media (max-width: 520px) {
  .cc-topbar--overlay { top: 10px; right: 10px; }
  .cc-lang-opt { min-width: 64px; min-height: 32px; padding: 7px 10px; font-size: 0.82rem; }
}

/* Toast shown after in-place language switching on a quiz */
.cc-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #0f172a; color: #fff;
  padding: 10px 16px; border-radius: 10px; font-size: 0.9rem; box-shadow: 0 8px 24px rgba(0,0,0,.35); z-index: 2000;
  opacity: 0; transition: opacity .25s ease; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.cc-toast.show { opacity: 1; }

/* Generic localised notice page (access denied, 404, ...) */
.cc-notice-body { margin: 0; min-height: 100vh; font-family: 'Noto Sans KR', 'Segoe UI', Roboto, Arial, sans-serif;
  background: linear-gradient(135deg, #0f172a, #1e3a8a, #1e40af); color: #fff; display: flex; align-items: center; justify-content: center; padding: 24px; }
.cc-notice { width: 100%; max-width: 560px; background: rgba(255,255,255,0.08); border: 1px solid rgba(74,158,255,.3); border-radius: 18px; padding: 28px; }
.cc-notice-top { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.cc-notice h1 { font-size: 1.5rem; margin: 0 0 12px; }
.cc-notice p { color: #dbeafe; line-height: 1.7; margin: 0 0 18px; }
.cc-notice-btn { display: inline-block; background: linear-gradient(135deg, #4a9eff 0%, #00d4ff 100%); color: #fff; padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 700; }

/* English text does not need keep-all; allow long words to wrap safely */
html[lang="en"] .question, html[lang="en"] .option, html[lang="en"] .modal-description,
html[lang="en"] .intro-text p { word-break: normal; overflow-wrap: break-word; }
