/* =============================================================================
   LOOMOFJOY — SIGNUP (PROFESSIONAL)
   -----------------------------------------------------------------------------
   TABLE OF CONTENTS
   1) CSS Variables (theme)
   2) Global Layout Override
   3) Page & Containers
   4) Card / Box
   5) Headings (Glass Title + Card Title)
   6) Form Layout
   7) Inputs & Selects (states, focus, invalid)
   8) Date Picker
   9) Password Utilities (wrapper + eye icon)
   9.5) Password Field Width (narrow + centered)
   10) Username Availability States + Helper Text
   11) Actions (Submit)
   12) Responsive
============================================================================= */


/* ============================================================================
   1) CSS VARIABLES (theme)
============================================================================ */
:root {
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.12);
  --text: #0f172a;              /* slate-900 */
  --text-muted: #475569;        /* slate-600 */
  --border: rgba(255, 255, 255, 0.22);
  --shadow: 0 8px 32px rgba(0,0,0,0.25);
  --primary: #4f46e5;           /* indigo-600 */
  --primary-700: #4338ca;       /* indigo-700 */
  --ok: #16a34a;                /* green-600 */
  --bad: #dc2626;               /* red-600 */
  --focus-ring: rgba(79,70,229,.35);
}


/* ============================================================================
   2) GLOBAL LAYOUT OVERRIDE
============================================================================ */
main.main-content {
  display: block !important;
  padding: 0;
  margin: 0;
  color: #fff; /* most text inside card is white */
}


/* ============================================================================
   3) PAGE & CONTAINERS
============================================================================ */
.signup-container {
  display: flex;
  justify-content: center;             /* center horizontally */
  padding: 40px 15px;
  min-height: calc(100vh - 150px);     /* leaves space for footer */
  box-sizing: border-box;
  /* Optional page background; comment out if your layout provides it */
  /* background: linear-gradient(120deg, #7b8fff 0%, #84d3fa 100%); */
}


/* ============================================================================
   4) CARD / BOX
============================================================================ */
.signup-box {
  background: var(--surface);
  backdrop-filter: blur(14px);
  padding: 25px 30px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  max-width: 750px;
  width: 100%;
  color: white;
  border: 1px solid rgba(255,255,255,.14);
}


/* ============================================================================
   5) HEADINGS (GLASS TITLE + CARD TITLE)
============================================================================ */
.glass-title {
  max-width: 750px;
  margin: 3rem auto 1rem;
  text-align: center;
  color: #fff;
}
.signup-box h2 {
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: .2px;
}


/* ============================================================================
   6) FORM LAYOUT
============================================================================ */
.form-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}
label {
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  opacity: .95;
}


/* ============================================================================
   7) INPUTS & SELECTS (STATES, FOCUS, INVALID)
============================================================================ */
.signup-box input,
.signup-box select {
  width: 100%;
  height: 44px;                          /* same height for all */
  padding: 10px 40px 10px 14px;          /* extra right padding (password icon space) */
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.22);
  outline: none;
  font-size: 14px;
  color: #0b1220;
  background: rgba(255,255,255,.95);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.signup-box input::placeholder,
.signup-box select::placeholder {
  color: #6b7280; /* gray-500 */
}
.signup-box input:focus,
.signup-box select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus-ring);
  background: #fff;
}
.signup-box input.is-invalid,
.signup-box select.is-invalid {
  border-color: var(--bad);
  box-shadow: 0 0 0 4px rgba(220,38,38,.25);
}


/* ============================================================================
   8) DATE PICKER
============================================================================ */
.signup-box input[type="date"] {
  padding-right: 40px; /* space for calendar icon */
}


/* ============================================================================
   9) PASSWORD UTILITIES (WRAPPER + EYE ICON)
============================================================================ */
.password-wrapper { position: relative; }
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%; transform: translateY(-50%);
  cursor: pointer;
  font-size: 22px;
  user-select: none;
  color: #9ca3af;           /* gray-400 */
  transition: color .18s ease, transform .06s ease;
}
.toggle-password:hover   { color: #ffffff; }
.toggle-password:active  { transform: translateY(-50%) scale(.96); }
/* Improve alignment for Material Symbols in inputs */
.material-symbols-outlined.toggle-password {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* ============================================================================
   9.5) PASSWORD FIELD WIDTH (NARROW + CENTERED)
   - Works with your existing HTML (even if it has inline "flex:1")
   - Adjust --pw-width to change the visual width
============================================================================ */
.signup-box .password-wrapper {
  --pw-width: 520px;                     /* <— set desired width */
  flex: 0 1 var(--pw-width) !important;  /* override any inline flex:1 */
  max-width: var(--pw-width);
  margin-left: auto;                     /* center within the row */
  margin-right: auto;
}


/* ============================================================================
   10) USERNAME AVAILABILITY STATES + HELPER TEXT
============================================================================ */
.username-available { color: #bbf7d0; font-weight: 600; } /* emerald-200 on dark bg */
.username-taken     { color: #fecaca; font-weight: 600; } /* red-200 on dark bg */
#usernameMsg {
  margin-top: 6px;
  font-size: 12px;
  display: block;
  min-height: 1.25em; /* reserve space to avoid layout shift */
}


/* ============================================================================
   11) ACTIONS (SUBMIT)
============================================================================ */
.google-login-btn {
  width: 50%;
  padding: 0.95rem;
  background: linear-gradient(180deg,#2563eb 0%,#1d4ed8 100%);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 1.05em;
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(29,78,216,.35), inset 0 -2px 0 rgba(255,255,255,.18);
  transition: transform .08s ease, filter .18s ease, box-shadow .18s ease;
  display: inline-block;
  margin: 6px auto 0;
}
.google-login-btn:hover {
  filter: brightness(1.04);
  box-shadow: 0 10px 26px rgba(29,78,216,.42), inset 0 -2px 0 rgba(255,255,255,.22);
  transform: translateY(-1px);
}
.google-login-btn:active   { transform: translateY(0); }
.google-login-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.google-login-btn:focus-visible {
  outline: 3px solid rgba(79,118,255,.45);
  outline-offset: 2px;
}


/* ============================================================================
   12) RESPONSIVE
============================================================================ */
@media (max-width: 768px) {
  .form-row { flex-direction: column; }
  .google-login-btn { width: 100%; }
  .signup-box .password-wrapper {
    flex-basis: 100% !important;
    max-width: 100%;
  }
}
/* iOS anti-zoom */
@supports (-webkit-touch-callout: none){
  input, select, textarea { font-size:16px !important; min-height:44px; }
  .gro-btn { font-size:16px; padding:12px 16px; }
}
/* ensure the mobile submenu button is visible everywhere (safe) */
.gro-item [data-act="more"]{ display:inline-flex !important; }
