/* ═══════════════════════════════════════════════════════════
   NetWord — overlays.css
   Styles for elements that appear on interaction:
   settings dropdown, modals, camera.
═══════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────
   SETTINGS DROPDOWN
─────────────────────────────────────── */
.settings-menu {
  position: relative;
}

.settings-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-modal);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 200;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.setting-row--wrap {
  flex-wrap: wrap;
}

.setting-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}

.btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-mini {
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.btn-mini:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-text);
}

.btn-mini--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.font-readout {
  font-size: 12px;
  color: var(--text-3);
  min-width: 36px;
  text-align: center;
}

.setting-select {
  font-size: 13px;
  padding: 4px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
}

.setting-pills {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg-layer);
  padding: 4px 10px;
  border-radius: 99px;
  width: fit-content;
}

.setting-row--signout {
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}

.btn-signout {
  width: 100%;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-3);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  cursor: pointer;
}

.btn-signout:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-text);
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ───────────────────────────────────────
   AUTH MODAL
─────────────────────────────────────── */

.auth-logo {
  height: 24px;
  width: auto;
  margin-right: auto;
}

.auth-logo--dark  { display: none; }

@media (prefers-color-scheme: dark) {
  .auth-logo--light { display: none; }
  .auth-logo--dark  { display: block; }
}

.modal-body--auth {
  padding: 16px 18px 20px;
}

.auth-step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-instruction {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.4;
  text-align: center;
}

.auth-input {
  width: 100%;
  padding: 9px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  text-align: center;
  letter-spacing: 0.03em;
}

.auth-input::placeholder {
  color: var(--text-3);
  letter-spacing: 0;
}

.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn-primary {
  width: 100%;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  transition: opacity 0.15s;
  cursor: pointer;
  border: none;
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-alt {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

.link-btn {
  color: var(--accent-text);
  font-size: inherit;
  font-family: inherit;
  font-weight: 500;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:hover {
  color: var(--accent);
}

/* ───────────────────────────────────────
   CAMERA MODAL
─────────────────────────────────────── */
.modal--camera {
  background: #000;
  align-items: stretch;
}

.modal--camera .modal-sheet {
  display: none;
}

.camera-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 60px 24px 100px;
  pointer-events: none;
}

.camera-hint {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.viewfinder {
  width: min(280px, 80vw);
  aspect-ratio: 3 / 1.2;
  position: relative;
}

.vf-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: #fff;
  border-style: solid;
  opacity: 0.9;
}

.vf-corner--tl { top: 0; left: 0;  border-width: 2px 0 0 2px; border-radius: 3px 0 0 0; }
.vf-corner--tr { top: 0; right: 0; border-width: 2px 2px 0 0; border-radius: 0 3px 0 0; }
.vf-corner--bl { bottom: 0; left: 0;  border-width: 0 0 2px 2px; border-radius: 0 0 0 3px; }
.vf-corner--br { bottom: 0; right: 0; border-width: 0 2px 2px 0; border-radius: 0 0 3px 0; }

.modal-close--overlay {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
}

.camera-shutter {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 3px solid rgba(255,255,255,0.8);
  transition: background 0.12s, transform 0.1s;
  pointer-events: all;
}

.camera-shutter::after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: #fff;
}

.camera-shutter:active {
  transform: translateX(-50%) scale(0.93);
  background: rgba(255,255,255,0.3);
}

/* ───────────────────────────────────────
   TRANSLATION PICKER MODAL
─────────────────────────────────────── */
.translation-label--btn {
  background: none;
  border: none;
  cursor: pointer;
  text-align: right;
  padding: 2px 4px;
  border-radius: var(--radius-xs);
  transition: background 0.12s;
}

.translation-label--btn:hover {
  background: var(--accent-soft);
}

.translation-list {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 4px;
}

.translation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.translation-item:hover:not([aria-disabled="true"]) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.translation-item--active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.translation-item--locked {
  opacity: 0.6;
  cursor: default;
}

.translation-item__abbr {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  min-width: 44px;
  flex-shrink: 0;
}

.translation-item__label {
  flex: 1;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.3;
}

.translation-item__badge {
  flex-shrink: 0;
}

.t-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
}

.t-badge--active {
  background: var(--accent);
  color: #fff;
}

.t-badge--free {
  background: var(--bg-layer);
  color: var(--text-3);
}

.t-badge--locked {
  background: var(--navy);
  color: #fff;
}
