/* =============================================================================
   WIZITO (WIZ-040.06) — Style Samouczka Podologicznego & Ergonomii Dotykowej
   ============================================================================= */

/* 1. Cele dotykowe min. 44x44px oraz ułatwienia w rękawiczkach zabiegowych */
.wiz-touch-target-44 {
  min-height: 44px !important;
  min-width: 44px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Przyciski palety kolorów rysika — min 44x44px z marginesem dotykowym */
#rfm-pen-colors .rfm-color-btn,
.wiz-pen-color-btn {
  min-width: 44px !important;
  min-height: 44px !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#rfm-pen-colors .rfm-color-btn:active,
.wiz-pen-color-btn:active {
  transform: scale(0.92);
}

/* 2. Ergonomia pól roboczych — min. 16px font-size na urządzeniach mobilnych
   zapobiega niepożądanemu zoomowi w iOS Safari i poprawia czytelność z odległości zabiegowej */
@media (max-width: 1024px) {
  #client-record-form input:not([type="checkbox"]):not([type="radio"]),
  #client-record-form select,
  #client-record-form textarea,
  #rec-modal-problems-view input,
  #rec-modal-problems-view select,
  .wiz-clinical-field {
    font-size: 16px !important;
    line-height: 1.4 !important;
    min-height: 44px !important;
  }
}

/* 3. Asystent klawiatury ekranowej (Visual Viewport keyboard-aware) */
.wiz-keyboard-active {
  padding-bottom: 70px !important;
}

.wiz-sticky-save-bar {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 40 !important;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08) !important;
}

/* 4. Modal samouczka podologicznego */
#modal-podology-tutorial {
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

#modal-podology-tutorial.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
}

.wiz-tutorial-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}

/* Wskaźniki postępu samouczka */
.wiz-step-pill {
  min-height: 38px;
  min-width: 38px;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.wiz-step-pill.active {
  background-color: #059669;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2);
}

.wiz-step-pill.completed {
  background-color: #10b981;
  color: #ffffff;
}

.wiz-step-pill.pending {
  background-color: #e2e8f0;
  color: #64748b;
}

.dark .wiz-step-pill.pending {
  background-color: #334155;
  color: #94a3b8;
}

/* 5. Odznaki statusów — semantyka tekst + ikona z wysokim kontrastem (WCAG AA) */
.wiz-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1rem;
  border-width: 1px;
}

.wiz-status-badge-active {
  background-color: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.dark .wiz-status-badge-active {
  background-color: #450a0a;
  color: #fecaca;
  border-color: #7f1d1d;
}

.wiz-status-badge-treated {
  background-color: #fffbeb;
  color: #92400e;
  border-color: #fde68a;
}
.dark .wiz-status-badge-treated {
  background-color: #451a03;
  color: #fef3c7;
  border-color: #78350f;
}

.wiz-status-badge-healed {
  background-color: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.dark .wiz-status-badge-healed {
  background-color: #064e3b;
  color: #a7f3d0;
  border-color: #047857;
}

/* 6. Tryb dużego tekstu dla osób starszych i specjalistów (accessibility) */
html.large-text-mode .wiz-tutorial-content {
  font-size: 18px !important;
  line-height: 1.6 !important;
}

html.large-text-mode .wiz-step-pill {
  min-height: 44px !important;
  min-width: 44px !important;
  font-size: 15px !important;
}

/* 7. Wyróżnienie fikcyjnych danych samouczka (Sandbox Badge) */
.wiz-sandbox-pill {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
