/* =========================================================
   GIFTALAYA / G-INVITE — Modern Authentication Modal CSS
   Matches Screenshot 2 (Sign in options) & Screenshot 3 (Guest input)
   ========================================================= */

.g-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: gAuthFade 0.22s ease-out;
  box-sizing: border-box;
}

@keyframes gAuthFade {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.g-auth-card {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 28px;
  padding: 40px 32px 32px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.03);
  position: relative;
  text-align: center;
  box-sizing: border-box;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.g-auth-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  line-height: 1;
}

.g-auth-close-btn:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #cbd5e1;
}

/* SCREEN 1: SIGN IN TO GET STARTED (Screenshot 2) */
.g-auth-subtitle {
  font-size: 16px;
  font-weight: 600;
  color: #64748b;
  margin: 0 0 24px;
}

.g-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.g-btn-auth-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 52px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.g-btn-auth-pill:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.g-btn-auth-pill.guest-btn {
  border: 1.5px dashed #cbd5e1;
  color: #475569;
}

.g-btn-auth-pill.guest-btn:hover {
  border-color: #d04a9b;
  color: #744b9e;
  background: #fdf7fa;
}

.g-auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 500;
}

.g-auth-divider::before, .g-auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.g-auth-divider span {
  padding: 0 14px;
}

.g-auth-terms {
  font-size: 12.5px;
  color: #94a3b8;
  margin-top: 26px;
  line-height: 1.5;
}

.g-auth-terms a {
  color: #744b9e;
  text-decoration: none;
  font-weight: 600;
}

.g-auth-terms a:hover {
  color: #d04a9b;
  text-decoration: underline;
}

/* SCREEN 2: CONTINUE AS GUEST (Screenshot 3) */
.g-guest-icon-box {
  width: 66px;
  height: 66px;
  background: linear-gradient(135deg, #744b9e 0%, #d04a9b 100%);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(116, 75, 158, 0.32);
}

.g-guest-title {
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

.g-guest-subtitle {
  font-size: 14.5px;
  color: #64748b;
  margin: 0 0 24px;
}

.g-auth-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #1e293b;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  margin-bottom: 14px;
  transition: all 0.2s;
  box-sizing: border-box;
}

.g-auth-input:focus {
  background: #ffffff;
  border-color: #d04a9b;
  box-shadow: 0 0 0 3.5px rgba(208, 74, 155, 0.15);
}

.g-btn-continue-sage,
.g-btn-continue-brand {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, #744b9e 0%, #d04a9b 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  box-shadow: 0 6px 18px rgba(208, 74, 155, 0.35);
}

.g-btn-continue-sage:hover,
.g-btn-continue-brand:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 10px 24px rgba(208, 74, 155, 0.45);
}

.g-auth-info-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  color: #64748b;
  margin-top: 18px;
  line-height: 1.4;
}

.g-auth-info-note svg {
  flex-shrink: 0;
  color: #744b9e;
}

/* SCREEN 3: EMAIL SIGN IN / REGISTER */
.g-email-view {
  text-align: left;
}
.g-email-view .g-auth-subtitle {
  text-align: center;
}
.g-form-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
  display: block;
}
.g-email-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}
.g-btn-secondary {
  height: 46px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #334155;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.g-btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.g-btn-primary {
  height: 46px;
  background: linear-gradient(135deg, #744b9e 0%, #d04a9b 100%);
  border: none;
  color: #fff;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(208, 74, 155, 0.28);
  transition: all 0.2s ease;
}
.g-btn-primary:hover {
  transform: translateY(-1.5px);
  filter: brightness(1.05);
  box-shadow: 0 8px 20px rgba(208, 74, 155, 0.38);
}

.g-auth-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 12px;
  text-align: center;
}

/* TOP NAVBAR LOGIN BUTTON */
.btn-nav-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-nav-login:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-nav-login.logged-in {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

/* User Account Dropdown in Navigation */
.nav-account-wrap {
  position: relative;
  display: inline-flex;
}

.nav-account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: #ffffff !important;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 10px;
  z-index: 999999 !important;
  display: none;
  flex-direction: column;
  gap: 3px;
  animation: navDropdownFade 0.18s ease-out;
  box-sizing: border-box;
}

.nav-account-dropdown.show {
  display: flex;
}

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

.nav-dropdown-header {
  padding: 8px 10px 10px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
  text-align: left;
}

.nav-dropdown-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-dropdown-role {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: all 0.15s;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
  font-family: inherit;
}

.nav-dropdown-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

.nav-dropdown-item.logout {
  color: #ef4444;
  margin-top: 4px;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
  border-radius: 0 0 10px 10px;
}

.nav-dropdown-item.logout:hover {
  background: #fef2f2;
  color: #dc2626;
}
