/* ==========================================================================
   EBFK-PUBLIC - Google Authentication UI Styles
   ========================================================================== */

.auth-dialog {
  --auth-text: #f3fff5;
  --auth-muted: #c8dfce;
  --auth-card: #102b1d;
  --auth-field: #173826;
  --auth-outline: #386348;
  --auth-accent: #d0ff38;
  color-scheme: dark;
  width: min(calc(100% - 1.25rem), 450px);
  max-height: calc(100dvh - 1.25rem);
  padding: clamp(1.2rem, 3vw, 1.75rem);
  border: 1px solid var(--auth-outline);
  border-radius: 1.25rem;
  color: var(--auth-text);
  background: linear-gradient(180deg, #123322 0%, #0c2317 100%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(208, 255, 56, 0.08);
}

.auth-dialog::backdrop {
  background: rgba(0, 20, 8, 0.75);
  backdrop-filter: blur(4px);
}

.auth-dialog .close {
  position: absolute;
  top: .9rem;
  right: 1.1rem;
  background: transparent;
  border: 0;
  color: var(--auth-muted);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: .2rem .4rem;
  border-radius: .4rem;
  transition: color .2s, transform .15s;
}

.auth-dialog .close:hover {
  color: #aef653;
  transform: scale(1.08);
}
.auth-dialog .close:focus-visible {
  outline: 2px solid #aef653;
  outline-offset: 2px;
}

/* ==========================================================================
   Google Auth Card Layout
   ========================================================================== */

.google-auth-card {
  text-align: center;
  padding-top: .4rem;
}

.auth-logo {
  display: block;
  width: min(65%, 115px);
  height: auto;
  max-height: 52px;
  object-fit: contain;
  margin: 0 auto .6rem;
  border-radius: .65rem;
}

.google-auth-card h2 {
  margin: 0 0 .4rem;
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 850;
  letter-spacing: -.03em;
  color: #fff;
  line-height: 1.2;
}

.auth-subtitle {
  margin: 0 auto 1.35rem;
  color: var(--auth-muted);
  font-size: .92rem;
  line-height: 1.45;
  max-width: 360px;
}

/* Google Action Button Box */
.google-auth-action-box {
  margin: 1.2rem 0 1.3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}

.google-signin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  max-width: 360px;
  min-height: 48px;
  padding: .65rem 1.25rem;
  background: #ffffff;
  color: #1f1f1f;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: .01em;
  border: 1px solid #c4d7cc;
  border-radius: 2rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: background-color .2s, transform .15s, box-shadow .2s;
}

.google-signin-btn:hover:not(:disabled) {
  background-color: #f7faf7;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 0 2px rgba(208, 255, 56, 0.3);
}

.google-signin-btn:active:not(:disabled) {
  transform: translateY(0);
}

.google-signin-btn:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 3px;
}

.google-signin-btn:disabled {
  opacity: 0.85;
  cursor: wait;
}

.google-icon {
  flex-shrink: 0;
  display: block;
}

/* Spinner */
.google-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #34A853;
  border-top-color: transparent;
  border-radius: 50%;
  animation: google-spin .7s linear infinite;
}

@keyframes google-spin {
  to { transform: rotate(360deg); }
}

.google-auth-status {
  min-height: 1.3em;
  margin: 0;
  font-size: .88rem;
  font-weight: 600;
  color: var(--auth-muted);
  transition: color .2s;
}

.google-auth-status.connecting {
  color: #ffd043;
}

.google-auth-status.success {
  color: #aef653;
  text-shadow: 0 0 10px rgba(174, 246, 83, 0.35);
}

/* Feature Badges */
.google-auth-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin: 1.1rem 0 1.25rem;
  padding: .75rem .5rem;
  background: rgba(23, 56, 38, 0.65);
  border: 1px solid rgba(82, 120, 96, 0.35);
  border-radius: .85rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  text-align: center;
}

.feature-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.feature-text {
  font-size: .75rem;
  font-weight: 600;
  color: #d8ede0;
  letter-spacing: .01em;
}

/* Disclaimer / Legal */
.google-auth-disclaimer {
  margin: .9rem 0 0;
  font-size: .78rem;
  line-height: 1.4;
  color: #7d9e89;
}

.auth-link {
  color: var(--auth-accent);
  text-decoration: underline;
  cursor: pointer;
}

.auth-link:hover {
  color: #ffffff;
}

/* ==========================================================================
   Profile Dialog Styles
   ========================================================================== */

#profile-dialog {
  position: fixed;
  inset: 4.75rem clamp(.85rem, 2.5vw, 2.5rem) auto auto;
  width: min(calc(100% - 1.7rem), 320px);
  max-height: calc(100dvh - 5.6rem);
  margin: 0;
  border: 1px solid var(--auth-outline);
  border-radius: 1.15rem;
  background: var(--auth-card);
}

#profile-dialog::backdrop {
  background: transparent;
}

#profile-dialog h2 {
  margin: 0 0 .5rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

.profile-details {
  margin: .7rem 0 .65rem;
  padding: .75rem .85rem;
  border-radius: .75rem;
  background: var(--auth-field);
  border: 1px solid rgba(82, 120, 96, 0.3);
}

.profile-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  margin-bottom: .25rem;
}

#profile-name {
  margin: 0;
  font-weight: 800;
  font-size: 1.05rem;
  color: #fff;
  overflow-wrap: anywhere;
}

.google-connected-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 750;
  color: #aef653;
  background: rgba(174, 246, 83, 0.12);
  border: 1px solid rgba(174, 246, 83, 0.35);
  padding: .15rem .45rem;
  border-radius: 1rem;
}

.google-mini-icon {
  flex-shrink: 0;
}

#profile-email {
  margin: 0;
  color: var(--auth-muted);
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.profile-photo-upload {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 .15rem;
  cursor: pointer;
  color: var(--auth-accent);
  font-size: .88rem;
  font-weight: 700;
}

.profile-photo-upload:hover {
  text-decoration: underline;
}

.profile-photo-upload:focus-within {
  outline: 2px solid var(--auth-accent);
  outline-offset: 2px;
  border-radius: .25rem;
}

#profile-photo-status {
  margin: 0 0 .45rem;
  color: var(--auth-accent);
  font-size: .85rem;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: .65rem;
  border-top: 1px solid var(--auth-outline);
}

.profile-actions .pill {
  min-height: 34px;
  padding: .35rem .85rem;
  color: var(--auth-text);
  font-size: .84rem;
  border: 1px solid var(--auth-outline);
  background: transparent;
  border-radius: 2rem;
  cursor: pointer;
  transition: background-color .2s, border-color .2s;
}

.profile-actions .pill:hover {
  background: rgba(255, 94, 94, 0.18);
  border-color: #ff6b6b;
  color: #ff8585;
  box-shadow: none;
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 420px) {
  .google-auth-features {
    grid-template-columns: 1fr;
    gap: .4rem;
  }
  .feature-item {
    flex-direction: row;
    justify-content: center;
  }
}
.profile-dialog-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--lime, #d0ff38);
  margin-right: .75rem;
}
.google-entry-button { display: flex; justify-content: flex-end; }
.auth-dialog .google-entry-button { justify-content: center; width: 100%; }
.auth-dialog .google-entry-status { text-align: center; margin: .5rem auto 0; }
.google-entry-status { max-width: 13rem; margin: .25rem 0 0; color: var(--muted-dark-surface); font-size: .8rem; }
.google-entry-status:empty, #account-profile-location [role="status"]:empty { display: none; }
@media (max-width: 480px) {
  .site-header:has(.google-entry) { padding-inline: .55rem; }
  .site-header:has(.google-entry) .brand img { width: min(19vw, 85px); }
  .site-header:has(.google-entry) .nav-toggle { width: 36px; justify-content: center; font-size: 0; }
  .site-header:has(.google-entry) .nav-toggle i { width: 1.1rem; height: 1.1rem; }
  .google-entry-status { max-width: 10rem; }
}
#account-profile-location label { margin: .45rem 0; }
#account-profile-location input { color: var(--auth-text); background: var(--auth-field); border-color: var(--auth-outline); }
#account-profile-location .pill { min-height: 33px; padding: .28rem .7rem; font-size: .8rem; }
