/* Shared auth UI — used by /login.html, /tee-sheet/login.html, and homepage modal */

.auth-gis-mount,
#google-signin-button,
#google-signin-button-modal {
  position: absolute;
  visibility: hidden;
  width: 400px;
  height: 50px;
  overflow: hidden;
  pointer-events: none;
}

.auth-google-btn,
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 0 1rem;
  border: 1px solid #e4e4e4;
  border-radius: 9999px;
  background: #faf9f8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  color: #171717;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.auth-google-btn:hover,
.google-btn:hover {
  background: #f0efee;
}

.auth-google-btn:active,
.google-btn:active {
  background: #e8e7e6;
}

.auth-google-btn:focus-visible,
.google-btn:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
}

.auth-google-btn svg,
.google-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.auth-error,
.error-msg,
.login-error-msg {
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--error-inline, var(--ps-error-inline, #c45555));
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  display: none;
  line-height: 1.45;
}

/* Homepage login modal — card surface over the page */
.auth-card {
  position: relative;
  background: #faf9f8;
  border: 1px solid #e4e4e4;
  border-radius: 20px;
  padding: 36px 28px 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.08);
  text-align: center;
}

.auth-card-brand {
  display: none;
}

.auth-card-header {
  margin-bottom: 28px;
}

.auth-card-title {
  font-size: 1.875rem;
  font-weight: 600;
  color: #171717;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  letter-spacing: -0.75px;
}

.auth-card-subtitle {
  color: #737373;
  font-size: 0.925rem;
  line-height: 1.5;
  font-weight: 400;
  margin: 0;
}

.auth-card-footer,
.modal-footer {
  margin-top: 20px;
  font-size: 0.8rem;
  color: #737373;
  line-height: 1.5;
}

.auth-card-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 9999px;
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1;
  color: #999;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-card-close:hover {
  background: #f0efee;
  color: #171717;
}

.auth-card--dialog {
  padding-top: 40px;
}

.auth-card--dialog .auth-card-title {
  padding-right: 0;
}

.auth-card .auth-google-btn,
.auth-card .google-btn {
  background: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .auth-google-btn,
  .google-btn {
    background: #2a2a28;
    border-color: #444441;
    color: #ecece9;
  }

  .auth-google-btn:hover,
  .google-btn:hover {
    background: #333330;
  }

  .auth-google-btn:active,
  .google-btn:active {
    background: #3a3a36;
  }

  .auth-google-btn:focus-visible,
  .google-btn:focus-visible {
    outline-color: #ecece9;
  }

  .auth-card {
    background: #2f2f2c;
    border-color: #444441;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  }

  .auth-card-title {
    color: #ecece9;
  }

  .auth-card-subtitle,
  .auth-card-footer,
  .modal-footer {
    color: #a3a3a3;
  }

  .auth-card-close {
    color: #888;
  }

  .auth-card-close:hover {
    background: #3a3a36;
    color: #ecece9;
  }

  .auth-card .auth-google-btn,
  .auth-card .google-btn {
    background: #2a2a28;
  }
}

@media (max-width: 520px) {
  .auth-card {
    padding: 32px 20px 22px;
    border-radius: 16px;
  }

  .auth-card--dialog {
    padding-top: 36px;
  }

  .auth-card-title {
    font-size: 1.6rem;
  }
}
