/**
 * Hebrew RTL polish + directional arrows + premium patient kiosk feel.
 */

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

html.locale-he,
html[dir='rtl'].hospai-patient {
  font-family: 'Heebo', 'Segoe UI', 'Arial Hebrew', 'David', sans-serif;
}

html.locale-he .step-heading,
html[dir='rtl'] .step-heading {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

/* Directional nav links */
.nav-link-back,
a[data-i18n='questions.backPaper'],
a[data-i18n='details.backPaper'] {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
  transition: color 0.15s ease, transform 0.15s ease;
}

[dir='rtl'] .nav-link-back:hover,
[dir='rtl'] a[data-i18n='questions.backPaper']:hover,
[dir='rtl'] a[data-i18n='details.backPaper']:hover {
  transform: translateX(3px);
}

[dir='ltr'] .nav-link-back:hover,
[dir='ltr'] a[data-i18n='questions.backPaper']:hover,
[dir='ltr'] a[data-i18n='details.backPaper']:hover {
  transform: translateX(-3px);
}

/* Primary actions — arrow glyph emphasis */
.hospai-patient .btn-primary,
.hospai-patient .login-kiosk-btn {
  letter-spacing: 0.01em;
  font-weight: 600;
}

html.locale-he .btn-primary,
html[dir='rtl'] .btn-primary {
  font-weight: 700;
}

/* Secretary speech bubble tail flips in RTL */
[dir='rtl'] .hospai-patient .secretary-bubble {
  border-radius: 1rem 0.85rem 0.35rem 1rem !important;
}

[dir='ltr'] .hospai-patient .secretary-bubble {
  border-radius: 0.85rem 1rem 1rem 0.35rem !important;
}

/* Workflow — progress reads right-to-left in Hebrew */
.workflow-steps {
  direction: inherit;
}

.workflow-steps .flex.items-center {
  gap: 0.25rem;
}

.workflow-steps .h-0\.5,
.workflow-steps .workflow-connector {
  margin-top: -1.25rem;
  border-radius: 2px;
  transition: background 0.35s ease, transform 0.35s ease;
}

[dir='rtl'] .workflow-steps .workflow-step-circle.active {
  animation: workflow-pulse-rtl 2s ease-in-out infinite;
}

@keyframes workflow-pulse-rtl {
  0%, 100% { box-shadow: 0 0 0 0 rgba(107, 158, 143, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(107, 158, 143, 0.12); }
}

.workflow-step-circle {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.workflow-step-circle.active {
  transform: scale(1.06);
}

.workflow-step-circle.done {
  box-shadow: 0 2px 8px rgba(143, 188, 143, 0.45);
}

/* Patient flow entrance */
.patient-flow > .text-center,
.patient-flow > .secretary-helper,
.patient-flow > .intake-card,
.patient-flow > form {
  animation: patient-enter 0.55s ease-out both;
}

.patient-flow > .secretary-helper { animation-delay: 0.05s; }
.patient-flow > .intake-card,
.patient-flow > form { animation-delay: 0.12s; }

@keyframes patient-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toolbar mic row — RTL order */
[dir='rtl'] .intake-toolbar {
  flex-direction: row-reverse;
}

[dir='rtl'] .intake-toolbar .voice-status {
  text-align: right;
}

/* Question cards */
[dir='rtl'] .question-card .flex.gap-2 {
  flex-direction: row-reverse;
}

[dir='rtl'] .question-legend {
  text-align: right;
}

/* Welcome steps */
[dir='rtl'] .welcome-steps li {
  flex-direction: row-reverse;
  text-align: right;
}

/* Lang picker */
[dir='rtl'] .lang-picker {
  flex-direction: row-reverse;
}

/* Premium button hover */
.hospai-patient .btn-primary {
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hospai-patient .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(107, 158, 143, 0.38);
}

.hospai-patient .btn-primary:active {
  transform: translateY(0);
}

/* Intake cards depth */
.hospai-patient .intake-card {
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.hospai-patient .intake-card:focus-within {
  box-shadow: 0 8px 32px rgba(107, 158, 143, 0.14);
  border-color: var(--pc-primary) !important;
}

/* Mismatch verify — directional separator */
.verify-mismatch-arrow {
  display: inline-block;
  margin: 0 0.25rem;
  opacity: 0.7;
  font-weight: 700;
}
