/* ============================================================
   YOUGIG BOOKING FORM — Custom CSS
   Requires: Bootstrap 5, Font Awesome 6, Poppins font
   ============================================================ */

/* ── CARD LAYOUT ── */
.booking-card {
  display: flex;
  width: 100%;
  max-width: 870px;
  min-height: 580px;
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 18px 55px rgba(0,0,0,0.13);
  background: #fff;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 255px;
  min-width: 255px;
  background: #7c3aed;
  border-radius: 14px 0 0 14px;
  padding: 32px 0 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.step-nav { list-style: none; padding: 0; margin: 0; }

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 22px;
  transition: background 0.2s;
}
.step-item.active { background: rgba(255,255,255,0.13); }

.step-icon-wrap {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.8);
  font-size: 16px; flex-shrink: 0; margin-top: 1px;
}

.step-text { flex: 1; }
.step-label { color: #fff; font-size: 14px; font-weight: 600; line-height: 1.3; }
.step-sub   { font-size: 11.5px; color: rgba(255,255,255,0.7); font-weight: 400; margin-top: 2px; word-break: break-word; }

.step-circle {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.45);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #fff;
  flex-shrink: 0; margin-top: 4px;
  transition: all 0.3s;
}
.step-circle.done       { background: #fff; border-color: #fff; color: #7c3aed; }
.step-circle.active-dot { border-color: rgba(255,255,255,0.9); background: rgba(255,255,255,0.15); }

.collapse-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 22px 14px;
  color: #fff; font-size: 13px; font-weight: 500;
  cursor: pointer;
  border-top: 1px solid rgba(255,255,255,0.18);
  margin-top: 10px;
}
.arrow-circle {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
}

/* ── MAIN CONTENT ── */
.main-content {
  flex: 1;
  display: flex; flex-direction: column;
  border-radius: 0 14px 14px 0;
  overflow: hidden;
}

.step-panel { display: none; flex-direction: column; flex: 1; }
.step-panel.active-panel { display: flex; }

.panel-header {
  padding: 22px 30px 16px;
  border-bottom: 1px solid #eaebf0;
}
.panel-header h4 { font-size: 19px; font-weight: 700; color: #1a1a2e; margin: 0; }

.panel-body { padding: 22px 30px; flex: 1; }

/* ── FORM ELEMENTS ── */
.form-label {
  font-size: 13px; font-weight: 600; color: #3a3a4a;
  margin-bottom: 7px; display: block;
}
.req { color: #e53e3e; margin-right: 2px; }

.form-control {
  border: 1.5px solid #dde0ea !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-size: 13.5px; color: #444;
  font-family: 'Poppins', sans-serif;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1) !important;
  outline: none;
}

/* ── CUSTOM SERVICE DROPDOWN ── */
.custom-select-wrap { position: relative; }

.custom-select-trigger {
  display: flex; align-items: center; justify-content: space-between;
  border: 1.5px solid #7c3aed;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 13.5px; color: #333;
  cursor: pointer; background: #fff;
  user-select: none;
}
.custom-select-trigger .placeholder { color: #999; }
.custom-select-trigger .arrow { font-size: 13px; color: #7c3aed; transition: transform 0.2s; }
.custom-select-trigger.open { border-radius: 8px 8px 0 0; }
.custom-select-trigger.open .arrow { transform: rotate(180deg); }

.custom-select-dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #fff;
  border: 1.5px solid #e0e0ea;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  z-index: 200;
  max-height: 280px;
  overflow-y: auto;
}
.custom-select-dropdown.open { display: block; }

.service-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  font-size: 13.5px; color: #333;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f3f3f8;
}
.service-option:last-child { border-bottom: none; }
.service-option:hover   { background: #f7f4ff; }
.service-option.selected { background: #f0ebff; }
.service-option .svc-price { color: #7c3aed; font-weight: 600; }

/* ── CALENDAR CONTROLS ── */
.cal-sel {
  border: 1.5px solid #dde0ea;
  border-radius: 8px;
  padding: 8px 32px 8px 12px;
  font-size: 14px;
  font-family: 'Poppins', sans-serif;
  color: #333;
  -webkit-appearance: none; appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23555' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E") no-repeat right 10px center;
  cursor: pointer;
  min-width: 115px;
}
.cal-sel:focus { border-color: #7c3aed; outline: none; }

.cal-nav-btn {
  width: 34px; height: 36px;
  border: 1.5px solid #dde0ea;
  background: #fff; color: #555;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; padding: 0; line-height: 1;
}
.cal-nav-btn:first-child { border-radius: 8px 0 0 8px; border-right: none; }
.cal-nav-btn:last-child  { border-radius: 0 8px 8px 0; }
.cal-nav-btn:hover { background: #f5f0ff; border-color: #7c3aed; color: #7c3aed; }

/* ── CALENDAR GRID ── */
.big-calendar { width: 100%; }
.big-cal-head { display: grid; grid-template-columns: repeat(7,1fr); margin-bottom: 6px; }
.big-cal-dn   { text-align: center; font-size: 12px; font-weight: 600; color: #888; padding: 4px 0 8px; }
.big-cal-body { display: grid; grid-template-columns: repeat(7,1fr); gap: 5px; }

.big-cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 500;
  border-radius: 8px; cursor: pointer;
  position: relative; transition: all 0.15s;
  color: #7c3aed;
  border: 1.5px solid #e0d5f7;
  background: #fff;
  min-height: 42px;
}
.big-cal-day:hover                        { background: #f0e8ff; border-color: #9b5de5; }
.big-cal-day.cal-selected                 { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.big-cal-day.cal-today::after             { content: ''; position: absolute; bottom: 4px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: #7c3aed; }
.big-cal-day.cal-today.cal-selected::after{ background: #fff; }
.big-cal-day.cal-disabled                 { color: #bbb; border-color: #ebebf0; background: #f7f7fa; cursor: default; pointer-events: none; }
.big-cal-day.cal-other                    { color: #ccc; border-color: #ebebf0; background: #f9f9fb; cursor: default; pointer-events: none; }

/* ── TIME SLOT GRID ── */
.slot-heading { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 12px; }
.time-slot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.ts-btn {
  border: 1.5px solid #e0d5f7;
  border-radius: 10px; padding: 12px 8px;
  text-align: center; font-size: 13px; font-weight: 500;
  font-family: 'Poppins', sans-serif;
  color: #7c3aed; background: #fff;
  cursor: pointer; transition: all 0.18s;
}
.ts-btn:hover      { background: #f0e8ff; border-color: #9b5de5; }
.ts-btn.selected   { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.ts-btn.unavailable{ opacity: 0.35; cursor: not-allowed; pointer-events: none; background: #f5f5f5; }

/* ── SUMMARY BOX ── */
.summary-box {
  background: #f8f5ff; border: 1.5px solid #e2d5ff;
  border-radius: 9px; padding: 13px 16px; margin-bottom: 20px;
}
.s-row   { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.s-label { color: #999; }
.s-value { font-weight: 600; color: #333; }

/* ── PAYMENT ── */
.payment-total {
  background: #7c3aed; color: #fff; border-radius: 9px;
  padding: 14px 18px; display: flex;
  justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.payment-total .pt-label  { font-size: 13px; opacity: 0.85; }
.payment-total .pt-amount { font-size: 22px; font-weight: 700; }

.card-input-wrap { position: relative; }
.card-input-wrap .card-icon { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #aaa; font-size: 16px; }
.card-input-wrap input { padding-right: 40px !important; }

/* ── PANEL FOOTER BUTTONS ── */
.panel-footer {
  padding: 16px 30px; border-top: 1px solid #eaebf0;
  display: flex; justify-content: flex-end; align-items: center; gap: 10px;
}
.btn-continue {
  background: #7c3aed; color: #fff; border: none;
  border-radius: 8px; padding: 10px 28px;
  font-size: 14px; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer; transition: background 0.2s, transform 0.1s;
}
.btn-continue:hover { background: #6d28d9; transform: translateY(-1px); }
.btn-back {
  background: transparent; color: #7c3aed;
  border: 1.5px solid #7c3aed; border-radius: 8px;
  padding: 9px 22px; font-size: 14px; font-weight: 600;
  font-family: 'Poppins', sans-serif; cursor: pointer; transition: all 0.2s;
}
.btn-back:hover { background: #f5f0ff; }

/* ── REPEAT POPUP ── */
.repeat-popup {
  display: none;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid #eaebf0;
  padding: 28px 30px 26px;
  z-index: 100;
  animation: slideUpInner 0.28s ease;
  border-radius: 0 0 14px 0;
}
.repeat-popup.show { display: block; }

@keyframes slideUpInner {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.repeat-popup h5 { font-size: 17px; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.repeat-popup p  { font-size: 13.5px; color: #777; margin-bottom: 0; line-height: 1.6; }

.repeat-popup-actions { display: flex; justify-content: flex-end; gap: 14px; align-items: center; margin-top: 22px; }

.btn-rep-no {
  background: transparent; border: none;
  font-size: 15px; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: #7c3aed; cursor: pointer;
  padding: 9px 20px; border-radius: 8px;
  transition: background 0.18s;
}
.btn-rep-no:hover { background: #f5f0ff; }

.btn-rep-yes {
  background: #7c3aed; border: none;
  font-size: 15px; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  color: #fff; cursor: pointer;
  padding: 10px 34px; border-radius: 8px;
  transition: background 0.18s, transform 0.1s;
  box-shadow: 0 4px 14px rgba(124,58,237,0.28);
}
.btn-rep-yes:hover { background: #6d28d9; transform: translateY(-1px); }

/* ── RECURRING STEP ── */
.rec-counter-btn {
  width: 36px; height: 38px;
  border: none; background: #f5f0ff;
  color: #7c3aed; font-size: 20px; font-weight: 400;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
  font-family: Arial, sans-serif;
  line-height: 1;
  padding: 0;
}
.rec-counter-btn:hover { background: #ede4ff; }

.rec-radio-row { display: flex; align-items: center; gap: 14px; cursor: pointer; padding: 4px 0; }

.rec-radio {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #dde0ea; background: #fff;
  flex-shrink: 0; transition: all 0.18s;
  display: flex; align-items: center; justify-content: center;
}
.rec-radio.active { border-color: #7c3aed; background: #7c3aed; box-shadow: inset 0 0 0 3px #fff; }

/* ── RECURRING SUMMARY ACCORDION ── */
.sum-acc-row    { border: 1.5px solid #e4e0f0; border-radius: 10px; overflow: hidden; background: #fff; }

.sum-acc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; cursor: pointer; user-select: none;
  transition: background 0.15s;
}
.sum-acc-header:hover { background: #faf8ff; }

.sum-acc-title   { font-size: 14px; font-weight: 600; color: #333; flex: 1; }
.sum-acc-actions { display: flex; align-items: center; gap: 6px; }

.sum-acc-chevron {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: #999; font-size: 13px; transition: transform 0.2s;
}
.sum-acc-chevron.open { transform: rotate(180deg); color: #7c3aed; }

.sum-acc-dots {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: #bbb; font-size: 16px; border-radius: 6px;
  cursor: pointer; transition: background 0.15s;
  position: relative;
}
.sum-acc-dots:hover { background: #f0ebff; color: #7c3aed; }

.dots-menu {
  display: none; position: absolute;
  right: 0; top: 32px;
  background: #fff; border: 1.5px solid #e4e0f0;
  border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  z-index: 300; min-width: 130px; overflow: hidden;
}
.dots-menu.open { display: block; }
.dots-menu-item { padding: 10px 14px; font-size: 13px; font-weight: 500; color: #444; cursor: pointer; transition: background 0.12s; }
.dots-menu-item:hover        { background: #f7f4ff; color: #7c3aed; }
.dots-menu-item.danger       { color: #e53e3e; }
.dots-menu-item.danger:hover { background: #fff5f5; }

.sum-acc-body { display: none; padding: 0 16px 16px; border-top: 1px solid #f0eef8; }
.sum-acc-body.open { display: block; }

.acc-cal-wrap { margin-top: 12px; }
.acc-cal-nav  { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.acc-cal-nav select { flex: 1; }

.acc-date-label {
  font-size: 13px; font-weight: 600; color: #555;
  padding-top: 10px;
}

.acc-time-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.acc-time-grid .ts-btn { padding: 14px 10px; font-size: 13.5px; font-weight: 600; border-radius: 10px; }

/* ── SUCCESS SCREEN ── */
.success-panel { display: none; flex-direction: column; flex: 1; overflow-y: auto; }
.success-panel.active-panel { display: flex; }

.success-body  { padding: 28px 32px 24px; flex: 1; }
.success-title { font-size: 22px; font-weight: 700; color: #1a1a2e; text-align: center; margin-bottom: 4px; }
.success-appt-id { text-align: center; font-size: 13px; color: #999; margin-bottom: 22px; }

.success-details { width: 100%; }
.sd-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 9px 0; font-size: 13.5px;
  border-bottom: 1px solid #f5f5f8;
}
.sd-row:last-child { border-bottom: none; }
.sd-label  { color: #aaa; font-weight: 500; min-width: 120px; }
.sd-val    { color: #222; font-weight: 600; text-align: right; flex: 1; }
.sd-divider{ height: 1px; background: #eee; margin: 6px 0; }

/* ── ADD TO CALENDAR BUTTONS ── */
.cal-link-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 10px; padding: 12px 8px;
  text-decoration: none; color: #fff;
  font-size: 12px; font-weight: 600;
  font-family: 'Poppins', sans-serif;
  transition: background 0.18s; cursor: pointer;
}
.cal-link-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }

.cal-link-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; overflow: hidden;
}

/* ── PHONE FLAG INPUT ── */
.phone-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #dde0ea;
  border-radius: 8px;
  overflow: visible;
  position: relative;
  background: #fff;
}
.phone-input-wrap:focus-within {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.phone-flag-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 10px 10px 10px 12px;
  cursor: pointer;
  border-right: 1.5px solid #dde0ea;
  user-select: none;
  white-space: nowrap;
  font-size: 13px;
  color: #444;
  flex-shrink: 0;
}
.phone-flag-btn:hover { background: #f7f4ff; }
#selectedFlag { display:flex; align-items:center; line-height:1; }
#selectedCode { font-size: 13px; font-weight: 600; color: #333; }

.phone-number-input {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 8px 8px 0 !important;
  flex: 1;
  padding-left: 10px !important;
}
.phone-number-input:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none;
}

.country-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 260px;
  background: #fff;
  border: 1.5px solid #e0e0ea;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  z-index: 500;
  max-height: 220px;
  overflow-y: auto;
}
.country-dropdown.open { display: block; }
.country-dropdown::-webkit-scrollbar { width: 4px; }
.country-dropdown::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.country-search {
  padding: 8px 12px;
  border-bottom: 1px solid #f0f0f5;
  position: sticky; top: 0; background: #fff;
}
.country-search input {
  width: 100%; border: 1.5px solid #e0e0ea;
  border-radius: 6px; padding: 6px 10px;
  font-size: 12.5px; font-family: 'Poppins', sans-serif;
  outline: none;
}
.country-search input:focus { border-color: #7c3aed; }

.country-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer;
  font-size: 13px; color: #333;
  transition: background 0.12s;
}
.country-item:hover { background: #f7f4ff; }
.country-item.selected { background: #f0ebff; }
.country-item .ci-flag { display:flex; align-items:center; width:24px; }
.country-item .ci-name { flex: 1; }
.country-item .ci-code { color: #999; font-size: 12px; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .booking-card   { flex-direction: column; }
  .sidebar        { width: 100%; min-width: unset; border-radius: 14px 14px 0 0; padding: 16px 0 10px; }
  .main-content   { border-radius: 0 0 14px 14px; }
  .panel-body     { padding: 18px 16px; }
  .panel-footer   { padding: 12px 16px; }
  .panel-header   { padding: 16px 16px 12px; }
  .time-slot-grid { grid-template-columns: 1fr; }
  .acc-time-grid  { grid-template-columns: 1fr; }
}
