/*
 * Approval-only styles
 * Scoped to pages using the "approval" layout.
 * These styles establish the visual identity of the approval & signing mode.
 */

/* ================================================
   Mode banner — thin indigo stripe at page top
   ================================================ */
.approval-mode-banner {
  background: #4338ca;   /* indigo-700 */
  height: 3px;
  width: 100%;
  flex-shrink: 0;
}

body[data-pwa-standalone="true"] {
  padding-top: env(safe-area-inset-top);
}

body[data-pwa-standalone="true"] [data-pwa-shell-target="hintBanner"] {
  display: none;
}

body[data-pwa-standalone="true"] .approval-page-shell {
  min-height: calc(100vh - env(safe-area-inset-top));
  min-height: calc(100svh - env(safe-area-inset-top));
  min-height: calc(100dvh - env(safe-area-inset-top));
}

body[data-pwa-standalone="true"] .approval-standalone-safe-bottom {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
}

/* ================================================
   Form inputs — clean, no shadow
   ================================================ */
.approval-form-input,
.approval-form-select,
.approval-form-textarea {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #111827;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: none;
}

.approval-form-input:focus,
.approval-form-select:focus,
.approval-form-textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.approval-form-input::placeholder,
.approval-form-textarea::placeholder {
  color: #9ca3af;
}

.approval-form-input.datepicker-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.approval-form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.25em 1.25em;
  padding-right: 2.5rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.approval-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

/* Inline label row (label + badge) */
.approval-form-label-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0.375rem;
}

.approval-form-label-row .approval-form-label {
  margin-bottom: 0;
}

/* Required star */
.approval-required-star {
  color: #ef4444;
  font-size: 0.875rem;
  line-height: 1;
}

/* Required dot — compact indicator */
.approval-required-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #ef4444;
  flex-shrink: 0;
  position: relative;
  top: -1px;
}

/* Optional badge */
.approval-optional-badge {
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ================================================
   Cards
   ================================================ */
.approval-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
}

.approval-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.approval-card-body {
  padding: 1.25rem;
}

/* Section indicator stripe */
.approval-section-stripe {
  width: 3px;
  height: 1.25rem;
  border-radius: 9999px;
  flex-shrink: 0;
}

/* ================================================
   Progressive disclosure toggle
   ================================================ */
.approval-disclosure-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #4f46e5;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.approval-disclosure-toggle:hover {
  color: #3730a3;
}

.approval-disclosure-toggle:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
  border-radius: 0.25rem;
}

.approval-disclosure-toggle svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

/* ================================================
   Hint box
   ================================================ */
.approval-hint-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  color: #64748b;
}
