/* ═══════════════════════════════════════════════════════
   Glow'n Beauty — Clinic Registration Form
   Custom styles (Tailwind can't handle these)
   ═══════════════════════════════════════════════════════ */

/* ── Safe area support ── */
.safe-top {
  padding-top: env(safe-area-inset-top, 0px);
}

.safe-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* ── Form step visibility ── */
.form-step {
  display: none;
  animation: slideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.form-step.active {
  display: block;
}

/* ── Specialty checkbox visual states ── */
.checkbox-card input:checked~div .spec-indicator,
.checkbox-card input:checked+div .spec-indicator {
  background: #c4944a;
  border-color: #c4944a;
}

.checkbox-card input:checked~div .spec-indicator svg,
.checkbox-card input:checked+div .spec-indicator svg {
  opacity: 1;
  transform: scale(1);
}

.checkbox-card input:checked~div>span,
.checkbox-card input:checked+div>span {
  color: #e6bb76;
}

/* ── Agreement checkbox visual states ── */
#contentPolicyAccepted:checked~div svg,
#contentPolicyAccepted:checked+div svg {
  opacity: 1;
  transform: scale(1);
}

/* ── Toggle knob movement ── */
.toggle-switch input:checked~div .toggle-knob,
.toggle-switch .peer:checked~div .toggle-knob {
  right: calc(100% - 23px) !important;
  background: white !important;
}

/* ── Background blobs animation ── */
.blob-1 {
  animation: floatBlob1 20s ease-in-out infinite;
}

.blob-2 {
  animation: floatBlob2 25s ease-in-out infinite;
}

@keyframes floatBlob1 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(-30px, 50px) scale(1.1);
  }

  66% {
    transform: translate(20px, -20px) scale(0.95);
  }
}

@keyframes floatBlob2 {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(40px, -30px) scale(1.05);
  }

  66% {
    transform: translate(-25px, 40px) scale(0.9);
  }
}

/* ── Animations ── */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-15px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shakeX {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(5px);
  }

  50% {
    transform: translateX(-5px);
  }

  75% {
    transform: translateX(3px);
  }
}

.field-error:not(:empty) {
  animation: shakeX 0.35s ease;
}

/* ── Success animation ── */
.success-circle-bg {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: strokeCircle 0.6s ease 0.2s forwards;
}

.success-check-path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: strokeCheck 0.3s ease 0.8s forwards;
}

@keyframes strokeCircle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes strokeCheck {
  to {
    stroke-dashoffset: 0;
  }
}

/* ── Toast ── */
.toast {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 9999;
  max-width: 90vw;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ── Offer card ── */
.offer-card {
  animation: slideIn 0.3s ease;
}

/* ── File upload drag state ── */
.file-upload-zone.drag-over {
  border-color: rgba(196, 148, 74, 0.5) !important;
  background: rgba(196, 148, 74, 0.06) !important;
}

/* ── Button spinner ── */
.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Custom Searchable Dropdown ── */
.city-option {
  padding: 8px 14px;
  font-size: 0.875rem;
  color: #d1d5db;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: right;
}

.city-option:hover {
  background: rgba(150, 120, 184, 0.15);
  color: #e6e0f0;
}

.city-option.selected {
  background: linear-gradient(135deg, rgba(150, 120, 184, 0.25), rgba(125, 211, 232, 0.15));
  color: #7DD3E8;
  font-weight: 500;
}

.city-option.hidden-option {
  display: none;
}

.city-options-list::-webkit-scrollbar {
  width: 4px;
}

.city-options-list::-webkit-scrollbar-track {
  background: transparent;
}

.city-options-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.city-options-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

#city-panel {
  animation: dropdownSlideIn 0.18s ease-out;
}

@keyframes dropdownSlideIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#city-dropdown .open #city-arrow,
#city-dropdown.open #city-arrow {
  transform: translateY(-50%) rotate(180deg);
}

/* ── Input error state ── */
.input-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1) !important;
}

/* ── Scrollbar styling ── */
#form-scroll-area::-webkit-scrollbar {
  width: 3px;
}

#form-scroll-area::-webkit-scrollbar-track {
  background: transparent;
}

#form-scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

#form-scroll-area::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ── Mobile-specific overrides ── */
@media (max-width: 480px) {

  .blob-1,
  .blob-2 {
    opacity: 0.5;
  }
}

/* ── Prevent iOS zoom on input focus ── */
@media screen and (max-width: 768px) {

  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ── Map Picker ── */
#clinic-map {
  background: #12121a;
}

#map-container {
  transition: border-color 0.2s;
}

#map-container:hover {
  border-color: rgba(150, 120, 184, 0.3);
}

#map-container.map-has-marker {
  border-color: rgba(16, 185, 129, 0.3);
}

/* Override Leaflet dark theme */
.leaflet-container {
  background: #12121a !important;
  font-family: 'Tajawal', sans-serif !important;
}

.leaflet-control-zoom {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: rgba(18, 18, 26, 0.9) !important;
  color: #d1d5db !important;
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 16px !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(30, 30, 42, 0.95) !important;
  color: #7DD3E8 !important;
}

.leaflet-control-attribution {
  background: rgba(10, 10, 15, 0.7) !important;
  color: rgba(255, 255, 255, 0.3) !important;
  font-size: 9px !important;
  backdrop-filter: blur(6px);
}

.leaflet-control-attribution a {
  color: rgba(150, 120, 184, 0.5) !important;
}

/* Map marker pulse animation */
.map-marker-pulse {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(150, 120, 184, 0.4);
  animation: markerPulse 1.5s ease-out infinite;
}

@keyframes markerPulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Locate me button loading state */
#btn-locate-me.locating {
  pointer-events: none;
  opacity: 0.7;
}

#btn-locate-me.locating i {
  animation: spin 1s linear infinite;
}

/* ── Confetti animation ── */
@keyframes confettiFall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}