/* ============================================
   SCHEDULER.CSS — Corporate Calendar Modal
   Calendly/HubSpot-style scheduling
   ============================================ */

/* ---- OVERLAY ---- */
.scheduler-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: all .35s cubic-bezier(.4,0,.2,1);
}
.scheduler-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ---- MODAL ---- */
.scheduler-modal {
  width: 580px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,.2), 0 12px 32px rgba(127,86,217,.08);
  position: relative;
  transform: translateY(20px) scale(.97);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  scrollbar-width: thin;
  scrollbar-color: #e5e7eb transparent;
}
.scheduler-overlay.active .scheduler-modal {
  transform: translateY(0) scale(1);
}
.scheduler-modal::-webkit-scrollbar { width: 6px; }
.scheduler-modal::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 6px; }

/* Close button */
.scheduler-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .9rem;
  transition: all .3s;
  z-index: 10;
}
.scheduler-close:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
  transform: rotate(90deg);
}

/* ---- HEADER ---- */
.scheduler-header {
  padding: 32px 32px 0;
  text-align: center;
}
.scheduler-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  margin-bottom: 16px;
  font-size: .82rem;
  color: #7F56D9;
}
.scheduler-brand i { font-size: .9rem; }
.scheduler-brand strong { color: #7F56D9; }
.scheduler-header h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 6px;
}
.scheduler-header p {
  font-size: .82rem;
  color: #6b7280;
}

/* ---- STEPS INDICATOR ---- */
.scheduler-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 32px 0;
}
.sch-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 600;
  color: #9ca3af;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  transition: all .3s;
}
.sch-step span {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 800;
  background: #e5e7eb;
  color: #9ca3af;
  transition: all .3s;
}
.sch-step.active {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #7F56D9;
}
.sch-step.active span {
  background: #7F56D9;
  color: #fff;
}
.sch-step.done {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #16a34a;
}
.sch-step.done span {
  background: #22c55e;
  color: #fff;
}

/* ---- PANELS ---- */
.scheduler-panel {
  display: none;
  padding: 24px 32px 32px;
  animation: schPanelIn .35s ease both;
}
.scheduler-panel.active { display: block; }
@keyframes schPanelIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---- CALENDAR ---- */
.sch-calendar {
  background: #fafbfd;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
}
.sch-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sch-cal-header h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
}
.sch-cal-nav {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .7rem;
  transition: all .25s;
}
.sch-cal-nav:hover {
  background: #7F56D9;
  border-color: #7F56D9;
  color: #fff;
}

.sch-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}
.sch-cal-weekdays span {
  text-align: center;
  font-size: .65rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 6px 0;
}

.sch-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.sch-cal-day {
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 600;
  transition: all .2s;
  position: relative;
}
.sch-cal-day--empty { visibility: hidden; }
.sch-cal-day--disabled {
  color: #d1d5db;
  cursor: not-allowed;
}
.sch-cal-day--weekend {
  color: #d1d5db;
  cursor: not-allowed;
}
.sch-cal-day--available {
  color: #1f2937;
  cursor: pointer;
  background: #fff;
  border: 1px solid #e5e7eb;
}
.sch-cal-day--available:hover {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #7F56D9;
  transform: scale(1.08);
}
.sch-cal-day--today {
  border: 2px solid #7F56D9 !important;
}
.sch-cal-day--today::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #7F56D9;
}
.sch-cal-day--selected {
  background: #7F56D9 !important;
  border-color: #7F56D9 !important;
  color: #fff !important;
  box-shadow: 0 4px 14px rgba(127,86,217,.35);
  transform: scale(1.08);
}
.sch-cal-day--selected::after { background: #fff !important; }

.sch-selected-info {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  font-size: .82rem;
  font-weight: 600;
  color: #7F56D9;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.sch-next-btn {
  margin-left: auto;
  padding: 8px 18px;
  border-radius: 8px;
  background: #7F56D9;
  color: #fff;
  border: none;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .3s;
}
.sch-next-btn:hover {
  background: #6d3fc4;
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(127,86,217,.3);
}

/* ---- TIME SLOTS ---- */
.sch-time-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.sch-back-btn {
  border: none;
  background: none;
  color: #7F56D9;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  transition: all .3s;
}
.sch-back-btn:hover { color: #6d3fc4; transform: translateX(-2px); }
.sch-date-chip {
  padding: 6px 14px;
  border-radius: 8px;
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  font-size: .76rem;
  font-weight: 600;
  color: #7F56D9;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sch-time-label {
  font-size: .75rem;
  color: #9ca3af;
  font-weight: 500;
  margin-bottom: 12px;
}

.sch-time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.sch-time-slot {
  padding: 14px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: all .25s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sch-time-slot:hover {
  border-color: #ddd6fe;
  background: #faf8ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(127,86,217,.1);
}
.sch-time-slot-time {
  font-size: .85rem;
  font-weight: 700;
  color: #1f2937;
}
.sch-time-slot-status {
  font-size: .65rem;
  color: #22c55e;
  font-weight: 500;
}
.sch-time-slot--taken {
  opacity: .4;
  cursor: not-allowed;
  background: #f9fafb;
}
.sch-time-slot--taken .sch-time-slot-status {
  color: #ef4444;
}
.sch-time-slot--taken:hover {
  transform: none;
  box-shadow: none;
}
.sch-time-slot--selected {
  background: #7F56D9 !important;
  border-color: #7F56D9 !important;
  box-shadow: 0 6px 20px rgba(127,86,217,.35);
  transform: scale(1.03);
}
.sch-time-slot--selected .sch-time-slot-time {
  color: #fff;
}
.sch-time-slot--selected .sch-time-slot-status {
  color: rgba(255,255,255,.7);
}

/* ---- FORM ---- */
.sch-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.sch-form-group {
  margin-bottom: 14px;
}
.sch-form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}
.sch-form-group label i {
  color: #7F56D9;
  font-size: .65rem;
}
.sch-form-group input,
.sch-form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid #e0e4ea;
  background: #f8f9fc;
  font-size: .85rem;
  font-family: 'Inter', sans-serif;
  color: #1f2937;
  transition: all .3s;
}
.sch-form-group input:focus,
.sch-form-group textarea:focus {
  outline: none;
  border-color: #7F56D9;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(127,86,217,.1);
}
.sch-form-group input::placeholder,
.sch-form-group textarea::placeholder {
  color: #9ca3af;
}
.sch-form-group textarea {
  resize: vertical;
  min-height: 60px;
}

.sch-submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #7F56D9, #6d3fc4);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .3s;
  box-shadow: 0 4px 16px rgba(127,86,217,.3);
}
.sch-submit-btn:hover {
  background: linear-gradient(135deg, #8f6ae5, #7F56D9);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(127,86,217,.4);
}
.sch-privacy {
  text-align: center;
  font-size: .68rem;
  color: #9ca3af;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.sch-privacy i { color: #22c55e; font-size: .65rem; }

/* ---- CONFIRMATION ---- */
.sch-confirm-content {
  text-align: center;
  padding: 20px 0;
}
.sch-confirm-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #dcfce7, #bbf7d0);
  animation: schConfirmPulse 1.5s ease infinite;
}
.sch-confirm-icon i {
  font-size: 2rem;
  color: #16a34a;
}
@keyframes schConfirmPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,.3); }
  50% { box-shadow: 0 0 0 16px rgba(34,197,94,0); }
}
.sch-confirm-content h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}
.sch-confirm-content > p {
  font-size: .85rem;
  color: #6b7280;
  margin-bottom: 20px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.sch-confirm-details {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px 22px;
  text-align: left;
  margin: 0 auto 20px;
  max-width: 400px;
}
.sch-confirm-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: .82rem;
  color: #374151;
}
.sch-confirm-item:last-child { border-bottom: none; }
.sch-confirm-item i {
  color: #7F56D9;
  font-size: .75rem;
  width: 16px;
  text-align: center;
}

.sch-confirm-btn {
  padding: 12px 32px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .3s;
  box-shadow: 0 4px 16px rgba(34,197,94,.3);
}
.sch-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(34,197,94,.4);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .scheduler-modal { border-radius: 16px; max-height: 95vh; }
  .scheduler-header { padding: 24px 20px 0; }
  .scheduler-panel { padding: 18px 20px 24px; }
  .sch-time-grid { grid-template-columns: repeat(2, 1fr); }
  .sch-form-row { grid-template-columns: 1fr; }
  .sch-cal-day { height: 36px; font-size: .76rem; }
}
