/* ---------------------------------------------------------
   VOICEBOT DATA COLLECTION - MASTER STYLES (2026)
   Theme: Slate Dark
   --------------------------------------------------------- */

/* Global Reset & Theme */
* {
  box-sizing: border-box;
}

body {
  background: #0f172a;
  color: #e5e7eb;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.5;
  touch-action: manipulation; /* Prevents double-tap zoom on mobile buttons */
}

/* Container & Header */
.container {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 20px;
}

header {
  margin-bottom: 24px;
}

h1 {
  font-size: 1.8rem;
  margin: 0;
  color: #f8fafc;
}

/* Cards & Layout */
.card {
  background: #020617;
  padding: 28px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 24px 0;
}

/* Pairing View */
#pairingPanel {
  direction: ltr !important;
  text-align: left !important;
}

.label {
  font-size: 13px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.pin {
  font-size: 64px;
  font-weight: 800;
  margin: 10px 0;
  color: #f8fafc;
  font-variant-numeric: tabular-nums;
}

.hint {
  margin-top: 12px;
  color: #94a3b8;
  font-size: 0.95rem;
}

/* Instructions */
.instructions h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.instructions ol {
  margin: 0;
  padding-left: 20px;
}

.instructions li {
  margin-bottom: 12px;
}

.phones {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.phones li {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-block;
  margin-right: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #38bdf8;
  font-weight: 600;
}

/* Sentence View */
.progressRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progressText {
  font-weight: 800;
  color: #38bdf8;
  font-size: 1.1rem;
}

.promptLabel {
  margin-bottom: 12px;
}

.sentence {
  font-size: 38px;
  font-weight: 700;
  color: #fde68a;
  margin: 20px 0;
  line-height: 1.25;
  word-break: break-word;
  /* Mixed content bidi support */
  unicode-bidi: plaintext; 
}

.sentence.subtle {
  color: #64748b;
  font-size: 24px;
}

/* RTL content specific styling */
.sentence[dir="rtl"] {
  font-family: "Tajawal", "Noto Naskh Arabic", system-ui, sans-serif;
  text-align: right;
  font-size: 42px; /* Arabic usually needs a slightly larger font to be readable */
}

.pnrToken {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(253, 230, 138, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Noise Controls */
.noiseBox {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.noiseRow {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.noiseLabel {
  font-weight: 700;
  color: #f8fafc;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.vol {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
}

#noiseVolume {
  flex-grow: 1;
  max-width: 200px;
  cursor: pointer;
}

.noiseNote {
  margin-top: 14px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.4;
}

/* Audio Unlock UI */
.audioNote {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(253, 224, 71, 0.15);
  border: 1px solid rgba(253, 224, 71, 0.4);
  color: #fef9c3;
  text-align: center;
}

.unlock-btn {
  background: #fde047;
  color: #020617;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: transform 0.1s ease, background 0.2s ease;
  text-transform: uppercase;
}

.unlock-btn:hover {
  background: #fef08a;
}

.unlock-btn:active {
  transform: scale(0.97);
}

/* Shared Helpers */
.hidden {
  display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .container {
    margin: 20px auto;
  }
  
  .card {
    padding: 20px;
  }

  .pin {
    font-size: 48px;
  }

  .sentence {
    font-size: 28px;
  }

  .sentence[dir="rtl"] {
    font-size: 32px;
  }

  #noiseVolume {
    max-width: 100%;
  }
  
  .noiseRow {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}