/* ==============================================================================
   MedRegia Public Portal — Authentication Styles
   Login, Signup, Input Contrast, Docked Public/Business Toggle & Toasts
   ============================================================================== */

/* ================= 1. FORMS & INPUT CONTRAST ================= */
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  height: 44px;
  background: #0B1915 !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
  caret-color: #5DCAA5 !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: #94A3B8 !important;
  font-size: 13.5px;
}

.form-input:focus {
  border-color: #5DCAA5 !important;
  box-shadow: 0 0 0 2px rgba(93, 202, 165, 0.25) !important;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 1.5px solid var(--line);
  transition: border-color 0.2s ease;
}

.input-shell:focus-within {
  border-bottom-color: var(--teal-mid);
}

.toggle-pw {
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 4px;
}

.toggle-pw:hover {
  color: var(--primary-bright);
}

/* ================= 2. BUTTONS ================= */
.book-btn {
  width: 100%;
  height: 44px;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  transition: background 0.15s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.book-btn:hover {
  background: #117a60;
}

.book-btn:active {
  transform: translateY(1px);
}

.btn-signin {
  width: 100%;
  padding: 12.5px 0;
  background: var(--teal-deep);
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.btn-signin:hover {
  background: var(--teal-mid);
}

.btn-signin:active {
  transform: translateY(1px);
}

/* ================= 3. DOCKED TOP-RIGHT PUBLIC/BUSINESS TOGGLE (MOBILE ONLY) ================= */
.mobile-only .hub-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 18px;
  position: relative;
  z-index: 20;
}

.mobile-only .seg-toggle {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
}

.mobile-only .seg-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-only .seg-btn:hover {
  color: #FFFFFF;
}

.mobile-only .seg-btn.active.is-public {
  background: rgba(13, 148, 136, 0.35);
  color: #2DD4BF;
  border: 1px solid rgba(45, 212, 191, 0.5);
  box-shadow: 0 0 10px rgba(13, 148, 136, 0.4);
}

.mobile-only .seg-btn.active.is-business {
  background: rgba(201, 138, 59, 0.25);
  color: #E7C696;
  border: 1px solid rgba(201, 138, 59, 0.5);
  box-shadow: 0 0 10px rgba(201, 138, 59, 0.35);
}

/* ================= 4. TOAST NOTIFICATIONS ================= */
#toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  z-index: 100;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  animation: slideDownToast 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.toast-msg {
  flex: 1;
  min-width: 0;
}

.toast-close-btn {
  background: transparent;
  border: none;
  color: inherit;
  opacity: 0.78;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 6px;
  flex-shrink: 0;
}

.toast-close-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.14);
}

.medregia-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.medregia-dialog-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface-1, #0E1F1B);
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
  color: var(--text, #ECEEEC);
}

@keyframes slideDownToast {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast.toast-success {
  background: rgba(15, 110, 86, 0.94);
  color: #FFFFFF;
  border: 1px solid #5DCAA5;
}

.toast.toast-error {
  background: rgba(136, 19, 55, 0.94);
  color: #FFFFFF;
  border: 1px solid #FF8FA3;
}

.toast.toast-info {
  background: rgba(16, 31, 27, 0.94);
  color: #ECEEEC;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Password Match Indicator */
.password-match-badge {
  font-size: 11px;
  margin-top: 4px;
  margin-bottom: 10px;
  display: none;
  font-weight: 500;
}

.password-match-badge.matched {
  display: block;
  color: #4ADE80;
}

.password-match-badge.mismatched {
  display: block;
  color: #FF8FA3;
}

@media (max-width: 768px) {
  .platform-toggle,
  .portal-segmented,
  .portal-segmented-control,
  .seg-toggle,
  .mobile-only .seg-toggle,
  .mobile-toggle-wrapper,
  #segBtnPublic,
  #segBtnBusiness {
    display: none !important;
  }
}

