/* ═══════════════════════════════════════════════════════════
   Edentify Appointments — Public Form Styles
   Folosește design tokens din 00-global-tokens.html
   ═══════════════════════════════════════════════════════════ */

.edf-wrap {
  font-family: var(--font-body, 'Inter', sans-serif);
  color: var(--text, #0D1628);
  max-width: 1040px;
  margin: 0 auto;
}

/* ── Grid ──────────────────────────────────────────────────── */
.edf-booking-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

/* ── Fields ────────────────────────────────────────────────── */
.edf-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.edf-field {
  margin-bottom: 18px;
}
.edf-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy-60, #3A4F6B);
  margin-bottom: 7px;
}
.edf-req   { color: var(--accent, #C17B75); }
.edf-optional { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--navy-30, #8A9BB5); font-size: 11px; }

.edf-field input,
.edf-field select,
.edf-field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border, #D6DCE6);
  border-radius: 6px;
  background: #fff;
  color: var(--text, #0D1628);
  font-size: 14px;
  font-family: inherit;
  line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.edf-field input::placeholder,
.edf-field textarea::placeholder { color: var(--navy-30, #8A9BB5); }
.edf-field input:focus,
.edf-field select:focus,
.edf-field textarea:focus {
  border-color: var(--navy, #0D1628);
  box-shadow: 0 0 0 3px rgba(13,22,40,.07);
}
.edf-field input.edf-error,
.edf-field select.edf-error,
.edf-field textarea.edf-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,.07);
}

/* Select arrow */
.edf-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A9BB5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.edf-err {
  display: block;
  font-size: 12px;
  color: #dc2626;
  margin-top: 5px;
  min-height: 16px;
}

/* ── Consents ──────────────────────────────────────────────── */
.edf-consents { margin-bottom: 20px; }
.edf-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted, #3A4F6B);
}
.edf-checkbox input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--navy, #0D1628);
  cursor: pointer;
}
.edf-checkbox a { color: var(--accent, #C17B75); text-decoration: underline; }

/* ── Submit button ─────────────────────────────────────────── */
.edf-submit {
  width: 100%;
  padding: 16px;
  background: var(--navy, #0D1628);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.edf-submit:hover:not(:disabled) {
  background: var(--navy-80, #1E2E46);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(13,22,40,.20);
}
.edf-submit:disabled {
  opacity: .7;
  cursor: not-allowed;
}
.edf-submit-loading svg {
  animation: edf-spin .8s linear infinite;
}
@keyframes edf-spin { to { transform: rotate(360deg); } }

.edf-disclaimer {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--navy-30, #8A9BB5);
  text-align: center;
  justify-content: center;
  margin-top: 14px;
}

/* ── Info card ─────────────────────────────────────────────── */
.edf-info-card {
  background: var(--navy, #0D1628);
  color: #fff;
  border-radius: 12px;
  padding: 28px 24px;
  position: sticky;
  top: 120px;
}
.edf-info-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 20px;
  color: #fff;
}

.edf-steps { margin-bottom: 24px; }
.edf-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.edf-step:last-child { margin-bottom: 0; }
.edf-step-n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.edf-step strong { display: block; font-size: 13px; color: #fff; margin-bottom: 3px; }
.edf-step p { font-size: 12px; color: rgba(255,255,255,.6); margin: 0; line-height: 1.5; }

.edf-trust-list {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 18px;
  margin-bottom: 20px;
}
.edf-trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
  margin-bottom: 10px;
}
.edf-trust-item svg { flex-shrink: 0; opacity: .7; }

.edf-contact-alt {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 18px;
}
.edf-contact-alt p { font-size: 11px; color: rgba(255,255,255,.5); margin-bottom: 10px; }
.edf-contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  margin-bottom: 8px;
  transition: opacity .15s;
}
.edf-contact-link:hover { opacity: .75; }
.edf-wa { color: #25d366; }

/* ── Success state ─────────────────────────────────────────── */
.edf-success {
  text-align: center;
  padding: clamp(48px, 8vw, 80px) 24px;
  animation: edf-fade-in .5s ease;
}
@keyframes edf-fade-in { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }

.edf-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #16a34a;
}
.edf-success-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  color: var(--navy, #0D1628);
  margin-bottom: 12px;
}
.edf-success-msg {
  font-size: 16px;
  color: var(--text-muted, #3A4F6B);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .edf-booking-grid { grid-template-columns: 1fr; }
  .edf-form-row     { grid-template-columns: 1fr; }
  .edf-info-card    { position: static; }
    .edf-info-col     { display: none; } /* ascunde "Ce se întâmplă după ce trimiți?" pe mobil */
  .edf-field input, .edf-field select, .edf-field textarea { font-size: 16px; } /* previne zoom iOS */
  .edf-submit { min-height: 52px; }
}

/* ═══════════════════════════════════════════════════════════
   Calendar widget — date picker cu disponibilitate vizuală
   ═══════════════════════════════════════════════════════════ */

.edf-cal {
  border: 1.5px solid var(--border, #D6DCE6);
  border-radius: 6px;
  background: #fff;
  padding: 14px 16px 12px;
  user-select: none;
}

/* Header: luna + butoane nav */
.edf-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.edf-cal-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #0D1628);
  letter-spacing: .01em;
}
.edf-cal-nav {
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--border, #D6DCE6);
  border-radius: 5px;
  background: #fff;
  color: var(--text, #0D1628);
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  padding: 0;
}
.edf-cal-nav:hover:not(:disabled) {
  background: #F0F3F7;
  border-color: var(--navy, #0D1628);
}
.edf-cal-nav:disabled {
  opacity: .35;
  cursor: default;
}

/* Zilele săptămânii */
.edf-cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.edf-cal-dow span {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--navy-30, #8A9BB5);
  padding: 4px 0;
}

/* Grid zile */
.edf-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

/* Celula zi — bază */
.edf-cal-day {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 5px;
  border: none;
  background: transparent;
  color: var(--text, #0D1628);
  cursor: default;
  transition: background .12s;
  padding: 0;
  font-family: inherit;
}

/* Zile alte luni */
.edf-cal-other { color: #C8D3DF; }

/* Zile din trecut */
.edf-cal-past  { color: #C8D3DF; }

/* Zile disponibile — se pot face click */
.edf-cal-avail {
  cursor: pointer;
}
.edf-cal-avail:hover { background: #F0F3F7; }

/* Azi */
.edf-cal-today { font-weight: 700; }
.edf-cal-today::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--navy-60, #3A4F6B);
}

/* Selectată */
.edf-cal-sel {
  background: var(--navy, #0D1628) !important;
  color: #fff !important;
}
.edf-cal-sel .edf-cal-dot--partial { background: rgba(255,255,255,.55) !important; }
.edf-cal-sel.edf-cal-today::after  { background: rgba(255,255,255,.6); }

/* Complet ocupată */
.edf-cal-full {
  color: #C8D3DF;
  text-decoration: line-through;
  cursor: not-allowed;
}

/* Parțial ocupată */
.edf-cal-partial { cursor: pointer; }
.edf-cal-partial:hover { background: #FFFBF0; }

/* Puncte indicator sub cifră */
.edf-cal-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.edf-cal-dot--full    { background: #DC2626; }
.edf-cal-dot--partial { background: #F59E0B; }

/* Legendă */
.edf-cal-legend {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border, #D6DCE6);
  flex-wrap: wrap;
}
.edf-cal-legend > span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--navy-30, #8A9BB5);
}

/* Loading */
.edf-cal-loading {
  text-align: center;
  padding: 28px 0;
  font-size: 13px;
  color: var(--navy-30, #8A9BB5);
}

@media (max-width: 480px) {
  .edf-cal-day { font-size: 11px; }
  .edf-cal-dow span { font-size: 9px; }
}

/* ── Panoul de sloturi orare (apare după selectarea datei) ── */
.edf-cal-slots {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #D6DCE6);
  animation: edf-fade-down .22s ease;
}
@keyframes edf-fade-down {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.edf-cal-slots-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--navy-60, #3A4F6B);
  margin-bottom: 10px;
}
.edf-cal-slots-head svg  { flex-shrink: 0; opacity: .55; }
.edf-cal-slots-head strong { color: var(--text, #0D1628); }

/* Grid sloturi */
.edf-cal-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.edf-cal-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 6px;
  border: 1.5px solid var(--border, #D6DCE6);
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 500;
  color: var(--text, #0D1628);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
  line-height: 1.3;
}
.edf-cal-slot:hover:not(.edf-cal-slot--sel) {
  border-color: var(--navy, #0D1628);
  background: #F0F3F7;
}

/* Selectat */
.edf-cal-slot--sel {
  border-color: var(--navy, #0D1628);
  background: var(--navy, #0D1628);
  color: #fff;
  box-shadow: 0 3px 10px rgba(13,22,40,.18);
}

/* Posibil ocupat */
.edf-cal-slot--busy {
  background: #FFFBEB;
  border-color: #FDE68A;
}
.edf-cal-slot--busy:hover:not(.edf-cal-slot--sel) {
  background: #FEF3C7;
  border-color: #F59E0B;
}
.edf-cal-slot--busy.edf-cal-slot--sel {
  background: var(--navy, #0D1628);
  border-color: var(--navy, #0D1628);
}

.edf-cal-slot-badge {
  font-size: 10px;
  font-weight: 600;
  color: #92400E;
  background: #FEF3C7;
  border-radius: 999px;
  padding: 1px 7px;
  line-height: 1.7;
  white-space: nowrap;
}
.edf-cal-slot--sel .edf-cal-slot-badge {
  color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.15);
}

/* Confirmare slot ales */
.edf-cal-slot-confirm {
  margin-top: 10px;
  padding: 9px 12px;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 6px;
  font-size: 12px;
  color: #166534;
  line-height: 1.55;
}
.edf-cal-slot-confirm strong { font-weight: 700; }
.edf-cal-slot-confirm span   { color: #4B7A60; font-size: 11px; }

@media (max-width: 480px) {
  .edf-cal-slots-grid { grid-template-columns: repeat(2, 1fr); }
}
