/* =======================================
   Consultation Request Form — Frontend CSS
   ======================================= */

:root {
  --crf-primary:   #4f46e5;
  --crf-primary-h: #4338ca;
  --crf-accent:    #7c3aed;
  --crf-success:   #16a34a;
  --crf-danger:    #dc2626;
  --crf-grey-50:   #f9fafb;
  --crf-grey-100:  #f3f4f6;
  --crf-grey-200:  #e5e7eb;
  --crf-grey-400:  #9ca3af;
  --crf-grey-700:  #374151;
  --crf-grey-900:  #111827;
  --crf-radius:    12px;
  --crf-shadow:    0 8px 32px rgba(79,70,229,.12);
}

.crf-wrapper {
  max-width: 680px;
  margin: 40px auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--crf-grey-700);
  position: relative;
}

/* STEP */
.crf-step {
  background: #fff;
  border-radius: var(--crf-radius);
  box-shadow: var(--crf-shadow);
  padding: 40px;
  display: none;
  animation: crfFadeIn .35s ease;
}
.crf-step.active { display: block; }

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

/* HEADER */
.crf-header { text-align: center; margin-bottom: 32px; }
.crf-icon   { font-size: 48px; margin-bottom: 12px; }
.crf-title  { font-size: 24px; font-weight: 700; color: var(--crf-grey-900); margin: 0 0 8px; }
.crf-subtitle { font-size: 15px; color: var(--crf-grey-400); margin: 0; line-height: 1.5; }

/* PROGRESS */
.crf-progress-bar-wrap {
  background: var(--crf-grey-100);
  border-radius: 999px;
  height: 6px;
  margin-bottom: 8px;
  overflow: hidden;
  position: relative;
}
.crf-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--crf-primary), var(--crf-accent));
  border-radius: 999px;
  width: 0%;
  transition: width .4s ease;
}
.crf-progress-label {
  display: block;
  text-align: right;
  font-size: 12px;
  color: var(--crf-grey-400);
  margin-bottom: 28px;
}

/* QUESTION SLIDE */
.crf-question-slide { display: none; }
.crf-question-slide.active { display: block; animation: crfFadeIn .3s ease; }

.crf-question-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--crf-grey-900);
  margin: 0 0 20px;
  line-height: 1.5;
}

/* ANSWER OPTIONS */
.crf-answers-list { display: flex; flex-direction: column; gap: 10px; }

.crf-answer-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 2px solid var(--crf-grey-200);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
  user-select: none;
}
.crf-answer-option:hover {
  border-color: var(--crf-primary);
  background: #f5f3ff;
  transform: translateX(3px);
}
.crf-answer-option input[type="radio"] { display: none; }
.crf-answer-option.selected {
  border-color: var(--crf-primary);
  background: #ede9fe;
}
.crf-answer-option.selected .crf-answer-label { color: var(--crf-primary); font-weight: 600; }
.crf-answer-label { font-size: 15px; flex: 1; }

.crf-answer-option::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 2px solid var(--crf-grey-200);
  border-radius: 50%;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.crf-answer-option.selected::before {
  background: var(--crf-primary);
  border-color: var(--crf-primary);
  box-shadow: inset 0 0 0 4px #fff;
}

/* NAV BUTTONS */
.crf-nav-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
}

/* BUTTONS */
.crf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.crf-btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }
.crf-btn-primary {
  background: var(--crf-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,70,229,.3);
}
.crf-btn-primary:hover:not(:disabled) {
  background: var(--crf-primary-h);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79,70,229,.4);
}
.crf-btn-secondary {
  background: var(--crf-grey-100);
  color: var(--crf-grey-700);
}
.crf-btn-secondary:hover { background: var(--crf-grey-200); }
.crf-btn-full { width: 100%; justify-content: center; margin-top: 24px; padding: 16px; font-size: 16px; }

/* STEP 2 — SCHEDULE */
.crf-section-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--crf-grey-400);
  margin: 24px 0 14px;
}

.crf-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.crf-field     { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.crf-field label { font-size: 14px; font-weight: 600; color: var(--crf-grey-700); }
.crf-field label small { font-weight: 400; color: var(--crf-grey-400); }
.req { color: var(--crf-danger); }

.crf-field input,
.crf-field select,
.crf-field textarea {
  padding: 10px 14px;
  border: 2px solid var(--crf-grey-200);
  border-radius: 8px;
  font-size: 15px;
  color: var(--crf-grey-900);
  transition: border-color .2s;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.crf-field input:focus,
.crf-field select:focus,
.crf-field textarea:focus {
  outline: none;
  border-color: var(--crf-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

/* TIME GRID */
.crf-time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.crf-time-btn {
  padding: 9px 6px;
  border: 2px solid var(--crf-grey-200);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--crf-grey-700);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
}
.crf-time-btn:hover { border-color: var(--crf-primary); color: var(--crf-primary); background: #f5f3ff; }
.crf-time-btn.selected {
  background: var(--crf-primary);
  border-color: var(--crf-primary);
  color: #fff;
}

/* ERROR */
.crf-error-msg {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--crf-danger);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-top: 12px;
}

/* STEP 3 — SUCCESS */
.crf-success-icon { animation: crfBounce .5s ease; }
@keyframes crfBounce {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1);   opacity: 1; }
}

.crf-booking-summary {
  background: var(--crf-grey-50);
  border: 1px solid var(--crf-grey-200);
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 24px;
}
.crf-summary-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--crf-grey-200); font-size: 15px; }
.crf-summary-row:last-child { border-bottom: none; }
.crf-summary-label { color: var(--crf-grey-400); }
.crf-summary-value { font-weight: 600; color: var(--crf-grey-900); }

/* SPINNER */
.crf-spinner {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.85);
  border-radius: var(--crf-radius);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; font-size: 15px; color: var(--crf-grey-400);
  z-index: 10;
}
.crf-spin-ring {
  width: 44px; height: 44px;
  border: 4px solid var(--crf-grey-200);
  border-top-color: var(--crf-primary);
  border-radius: 50%;
  animation: crfSpin .75s linear infinite;
}
@keyframes crfSpin { to { transform: rotate(360deg); } }

/* RESPONSIVE */
@media (max-width: 540px) {
  .crf-step         { padding: 24px 20px; }
  .crf-field-row    { grid-template-columns: 1fr; }
  .crf-time-grid    { grid-template-columns: repeat(2, 1fr); }
  .crf-nav-buttons  { flex-direction: column-reverse; }
  .crf-btn          { width: 100%; justify-content: center; }
}
