/* ============================
   AUTH MODAL & FORMS (scoped)
   ============================ */

/* Overlay */
#loginModal {
  position: fixed;
  inset: 0;
  display: none;                 /* JS toggles to flex */
  align-items: center;
  justify-content: center;
  padding: 24px;                 /* room around the dialog on small screens */
  background: rgba(0, 0, 0, 0.82);
  z-index: 10000;
  opacity: 0;
  transition: opacity .22s ease;
}
#loginModal.open { opacity: 1; }

/* Dialog */
#loginModal .auth-modal-content {
  position: relative;
  width: 100%;
  max-width: 900px;              /* more breathing room */
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 55px rgba(0,0,0,.18);
  padding: 28px 28px 24px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .22s ease, transform .22s ease;
  z-index: 10001;                /* above overlay */
}
#loginModal .auth-modal-content.open {
  opacity: 1;
  transform: translateY(0);
}

/* Close button */
#loginModal .modal-close{
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: #fff;
  color: #111;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  font-size: 25px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
}

/* Tabs (Login / Register Business / Register Visitor) */
#loginModal .auth-tabs{
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
#loginModal .auth-tab{
  appearance: none;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 16px;
  color: #374151;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
#loginModal .auth-tab:hover{
  background: #ffffff;
  border-color: #d1d5db;
}

/* Section titles, small helpers */
#loginModal h2{
  margin: 4px 0 12px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 700;
  color: #111827;
}
#loginModal .form-subtitle{
  margin: -4px 0 14px;
  color: #6b7280;
  font-size: 13px;
}

/* Forms container */
#loginModal .auth-form{
  display: none;                 /* JS decides which to show */
}
#loginModal .auth-form:where(#loginForm){ display: block; } /* default */

/* Groups with icons */
#loginModal .form-group{
  position: relative;
  margin-bottom: 14px;
}
#loginModal .form-group i{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: #9ca3af;
  pointer-events: none;
}

/* Inputs / Textareas */
#loginModal .auth-form input[type="text"],
#loginModal .auth-form input[type="email"],
#loginModal .auth-form input[type="password"],
#loginModal .auth-form input[type="tel"],
#loginModal .auth-form input[type="url"],
#loginModal .auth-form textarea{
  width: 100%;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #111827;
  border-radius: 10px;
  font-size: 14px;
  padding: 12px 12px 12px 40px;  /* left space for icon */
  outline: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
#loginModal .auth-form textarea{
  padding-left: 12px;            /* textareas usually don't have icons */
  resize: vertical;
}
#loginModal .auth-form input:focus,
#loginModal .auth-form textarea:focus{
  border-color: #f97316;         /* brandy orange focus */
  background: #fff;
  box-shadow: 0 0 0 3px rgba(249,115,22,.15);
}

/* 2-up grid (City/State etc.) */
#loginModal .form-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 560px){
  #loginModal .auth-modal-content { padding: 22px 18px; }
  #loginModal .form-grid{ grid-template-columns: 1fr; }
}

/* Dividers & mini section headers */
#loginModal .form-divider{
  border: 0;
  border-top: 1px solid #f1f5f9;
  margin: 18px 0 14px;
}
#loginModal .form-section-title{
  margin: 0 0 8px;
  font-weight: 700;
  color: #111827;
}

/* Submit button */
#loginModal .btn-submit{
  display: inline-block;
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: #f97316;           /* orange */
  cursor: pointer;
  transition: transform .02s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 6px 18px rgba(249,115,22,.25);
}
#loginModal .btn-submit:hover{ background: #ea700f; }
#loginModal .btn-submit:active{ transform: translateY(1px); }

/* Switcher links under forms */
#loginModal .form-switcher{
  margin: 10px 0 0;
  font-size: 13px;
  color: #6b7280;
}
#loginModal .form-switcher a{
  color: #f97316;
  font-weight: 600;
  text-decoration: none;
}
#loginModal .form-switcher a:hover{ text-decoration: underline; }

/* Small helpers for spacing in the Business form */
#registerBusinessForm .form-group + .form-group{ margin-top: 10px; }
#registerBusinessForm { margin-top: 4px; }  /* tiny offset below the heading */

/* Hide the top tab buttons in the auth modal */
#loginModal .auth-tabs { 
  display: none !important; 
}
/* ---------- Register Business: sizing/typography ---------- */
#loginModal #registerBusinessForm { font-size: 1.15rem; }          /* readable base */
#loginModal #registerBusinessForm h2 { font-size: 1.5rem; }        /* your request */
#loginModal #registerBusinessForm .form-section-title { font-size: 1.8rem; }

/* Inputs scale with the bigger text */
#loginModal #registerBusinessForm input,
#loginModal #registerBusinessForm textarea {
  font-size: 1.3rem;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* ---------- Two-column grid (auto stacks on small screens) ---------- */
#loginModal #registerBusinessForm .two-col-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
#loginModal #registerBusinessForm .span-2 { grid-column: 1 / -1; }

@media (min-width: 900px){
  #loginModal #registerBusinessForm .two-col-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Badges UI ---------- */
#loginModal #registerBusinessForm .badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
#loginModal #registerBusinessForm .badge-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
#loginModal #registerBusinessForm .badge-option:hover {
  background: #fff;
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}
#loginModal #registerBusinessForm .badge-option input {
  width: 18px; height: 18px;
}
#loginModal #registerBusinessForm .badge-option img {
  width: 50px; height: 50px; object-fit: contain;
}
#loginModal #registerBusinessForm .badge-option span {
  font-weight: 600; color: #111827;
}

/* Hide the old top tabs (you asked for bottom links only) */
#loginModal .auth-tabs { display: none !important; }
/* Helper link under the small services textarea */

#loginModal .inline-helper-link{
  display:inline-block;margin-top:8px;font-size:1.2rem;
  color:#f97316;font-weight:600;text-decoration:none;
}
#loginModal .inline-helper-link:hover{ text-decoration:underline; }

/* Mini sheet modal (inside the main auth modal) */
#loginModal .sheet-modal{
  position: fixed; inset: 0; display:none; align-items:center; justify-content:center;
  background: rgba(0,0,0,0.35); z-index: 10002;
}
#loginModal .sheet-modal-card{
  width: min(820px, 92vw); background:#fff; border-radius:14px; padding:0;
  box-shadow:0 20px 55px rgba(0,0,0,.25); overflow:hidden;
}
#loginModal .sheet-modal-header{
  display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid #eef2f7;
}
#loginModal .sheet-modal-header h3{ margin:0; font-size:1.5rem; }

#loginModal .sheet-close{ background:#fff;border:0;border-radius:50%;width:36px;height:36px;cursor:pointer;font-size:22px;box-shadow:0 2px 8px rgba(0,0,0,.12); }

#loginModal .sheet-modal-body{ padding:16px; }
#loginModal .sheet-modal-body textarea{
  width:100%; min-height:300px; resize:vertical; border:1px solid #e5e7eb; border-radius:10px; padding:12px;
}
#loginModal .sheet-modal-footer{ padding:12px 16px 16px; }
