/* =============================================================================
   SmartHomeSewa — User Dropdown + Appointment Popup
   ============================================================================= */

/* ─────────────────────────────────────────────────────────────────────────── */
/* USER DROPDOWN in top bar                                                     */
/* ─────────────────────────────────────────────────────────────────────────── */
.shs-user-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.shs-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 4px 10px 4px 4px;
  border-radius: 100px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  transition: background .15s;
  position: relative;
  user-select: none;
}
.shs-user-btn:hover { background: rgba(255,255,255,.14); }
.shs-user-btn .u-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.shs-user-btn .u-name {
  font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.85);
  max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shs-user-btn .u-chevron {
  font-size: 9px; color: rgba(255,255,255,.45);
  transition: transform .18s;
}
.shs-user-btn.open .u-chevron { transform: rotate(180deg); }

/* Dropdown — position absolute, opens below button */
.shs-user-wrap {
  position: relative !important;
}
.shs-user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  z-index: 9999;
  width: 240px;
  min-width: 240px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,.2), 0 2px 10px rgba(0,0,0,.1);
  overflow: hidden;
}
.shs-user-dropdown.shs-dd-open {
  display: block !important;
}

/* Dropdown header */
.shs-ud-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0f172a, #1a2744);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.shs-ud-head .big-av {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.15);
}
.shs-ud-name { font-size: .875rem; font-weight: 700; color: #fff; margin-bottom: 1px; }
.shs-ud-phone { font-size: .75rem; color: rgba(255,255,255,.45); }

/* Dropdown links */
.shs-ud-links { padding: 6px 0; }
.shs-ud-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: .875rem;
  font-weight: 600;
  color: #374151;
  text-decoration: none;
  transition: background .13s, color .13s;
  cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  font-family: 'Plus Jakarta Sans','Inter',sans-serif;
}
.shs-ud-link i { width: 16px; text-align: center; color: #94a3b8; transition: color .13s; font-size: 13px; }
.shs-ud-link:hover { background: #f8fafc; color: #2563eb; }
.shs-ud-link:hover i { color: #2563eb; }
.shs-ud-link.book { color: #2563eb; }
.shs-ud-link.book i { color: #2563eb; }
.shs-ud-link.book:hover { background: #eff6ff; }
.shs-ud-sep { height: 1px; background: #f1f5f9; margin: 4px 0; }
.shs-ud-link.logout { color: #ef4444; }
.shs-ud-link.logout i { color: #fca5a5; }
.shs-ud-link.logout:hover { background: #fef2f2; }

/* "Book Now" CTA button in navbar (opened popup) */
.shs-cta-popup {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #2563eb;
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: 8px;
  text-decoration: none !important;
  cursor: pointer;
  border: 2px solid #2563eb;
  box-shadow: 0 1px 3px rgba(37,99,235,.25), 0 4px 12px rgba(37,99,235,.2);
  transition: background .18s, box-shadow .18s, transform .15s;
  font-family: 'Plus Jakarta Sans','Inter',sans-serif;
  letter-spacing: .005em;
  line-height: 1.4;
}
.shs-cta-popup:hover {
  background: #1d4ed8 !important;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(37,99,235,.35), 0 8px 20px rgba(37,99,235,.25);
  transform: translateY(-1px);
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* APPOINTMENT POPUP MODAL                                                       */
/* ─────────────────────────────────────────────────────────────────────────── */
.appt-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(10,14,28,.6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.appt-overlay.open { opacity: 1; pointer-events: auto; }

.appt-modal {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(.95) translateY(16px);
  opacity: 0;
  transition: transform .28s cubic-bezier(.4,0,.2,1), opacity .25s;
}
.appt-overlay.open .appt-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Modal header */
.appt-modal-head {
  background: linear-gradient(135deg, #0f172a, #1a2744);
  padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  gap: 12px;
}
.appt-modal-head-left {
  display: flex; align-items: center; gap: 12px;
}
.appt-modal-user-av {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0d9488);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
  border: 2px solid rgba(255,255,255,.15);
  flex-shrink: 0;
}
.appt-modal-title { font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: 1px; }
.appt-modal-subtitle { font-size: .75rem; color: rgba(255,255,255,.5); }
.appt-modal-points {
  background: rgba(37,99,235,.25);
  border: 1px solid rgba(37,99,235,.4);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: .75rem; font-weight: 700; color: #93c5fd;
  display: flex; align-items: center; gap: 5px;
}
.appt-modal-close {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7); font-size: 14px; cursor: pointer;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.appt-modal-close:hover { background: rgba(255,255,255,.2); color: #fff; }

/* Scrollable body */
.appt-modal-body {
  overflow-y: auto;
  padding: 24px 28px;
  flex: 1;
}

/* Alert messages */
.appt-alert-err {
  background: #fef2f2; border: 1px solid #fecaca; border-left: 3px solid #ef4444;
  border-radius: 8px; padding: 10px 14px;
  color: #dc2626; font-size: .875rem; margin-bottom: 16px;
  display: flex; align-items: flex-start; gap: 8px;
}
.appt-alert-ok {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-left: 3px solid #16a34a;
  border-radius: 8px; padding: 10px 14px;
  color: #15803d; font-size: .875rem; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px; font-weight: 600;
}

/* Form grid */
.appt-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 14px; }
.appt-grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-bottom: 14px; }
.appt-full   { grid-column: 1 / -1; }

/* Field */
.appt-field {}
.appt-label {
  display: block; font-size: .6875rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: #374151; margin-bottom: 5px;
}
.appt-label .req { color: #ef4444; margin-left: 2px; }
.appt-input {
  width: 100%; background: #f9fafb; border: 1.5px solid #e5e7eb;
  border-radius: 9px; padding: 10px 13px; font-size: .9375rem; color: #1f2937;
  font-family: 'Inter',sans-serif;
  transition: border-color .18s, background .18s, box-shadow .18s; outline: none;
}
.appt-input:focus { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.appt-input.is-err { border-color: #ef4444; }
textarea.appt-input { resize: vertical; min-height: 90px; line-height: 1.6; }
.appt-err { font-size: .8125rem; color: #ef4444; margin-top: 3px; display: block; }

/* CAPTCHA */
.appt-captcha {
  display: flex; align-items: center; gap: 12px;
  background: #f9fafb; border: 1.5px solid #e5e7eb;
  border-radius: 9px; padding: 9px 12px;
}
.appt-captcha.is-err { border-color: #ef4444; }
.appt-captcha img { border-radius: 6px; height: 44px; cursor: pointer; display: block; }
.appt-cap-refresh {
  background: none; border: none; cursor: pointer; color: #94a3b8;
  font-size: 11px; padding: 2px 0; display: flex; align-items: center; gap: 3px;
  font-family: 'Inter',sans-serif; transition: color .15s;
}
.appt-cap-refresh:hover { color: #2563eb; }
.appt-cap-field { flex: 1; }
.appt-cap-field label { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #9ca3af; display: block; margin-bottom: 3px; }
.appt-cap-field input { width: 100%; background: transparent; border: none; outline: none; font-size: .9375rem; color: #1f2937; font-weight: 700; font-family: 'Inter',sans-serif; letter-spacing: .05em; }
.appt-cap-field input::placeholder { color: #d1d5db; font-weight: 400; letter-spacing: normal; }

/* Fee + refer */
.appt-fee {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
  padding: 9px 12px; font-size: .875rem; font-weight: 600; color: #92400e;
  display: flex; align-items: center; gap: 7px;
}

/* Modal footer */
.appt-modal-foot {
  padding: 16px 28px;
  border-top: 1px solid #f1f5f9;
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0; flex-wrap: wrap;
}
.appt-submit {
  display: inline-flex; align-items: center; gap: 8px;
  background: #2563eb; color: #fff; font-size: .9375rem; font-weight: 700;
  padding: 12px 28px; border-radius: 10px; border: none; cursor: pointer;
  font-family: 'Plus Jakarta Sans','Inter',sans-serif;
  box-shadow: 0 2px 12px rgba(37,99,235,.3);
  transition: background .18s, transform .15s; letter-spacing: .01em;
}
.appt-submit:hover { background: #1d4ed8; transform: translateY(-1px); }
.appt-submit:disabled { opacity: .6; cursor: default; transform: none; }
.appt-sec { display: flex; align-items: center; gap: 5px; font-size: .75rem; color: #94a3b8; }
/* Honeypot */
.appt-hp { position: absolute; opacity: 0; height: 0; width: 0; overflow: hidden; pointer-events: none; }

/* Login gate (for guests) */
.appt-login-gate {
  text-align: center; padding: 40px 20px;
}
.appt-login-gate i { font-size: 2.5rem; color: #93c5fd; margin-bottom: 14px; display: block; }
.appt-login-gate h3 { font-size: 1.125rem; font-weight: 700; color: #0f172a; margin-bottom: 8px; }
.appt-login-gate p { font-size: .9375rem; color: #64748b; margin-bottom: 20px; }
.appt-login-gate a { display: inline-flex; align-items: center; gap: 8px; background: #2563eb; color: #fff; padding: 11px 24px; border-radius: 10px; font-size: .9375rem; font-weight: 700; text-decoration: none; transition: background .15s; }
.appt-login-gate a:hover { background: #1d4ed8; color: #fff; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .appt-overlay { align-items: flex-end; padding: 0; }
  .appt-modal { max-height: 92vh; border-radius: 20px 20px 0 0; }
  .appt-grid-3 { grid-template-columns: 1fr 1fr; }
  .appt-grid-2 { grid-template-columns: 1fr; }
  .appt-modal-body { padding: 16px 18px; }
  .appt-modal-foot { padding: 12px 18px; }
}
@media (max-width: 479px) {
  .appt-grid-3 { grid-template-columns: 1fr; }
  .shs-ud-name { max-width: 70px; }
}
