/* SIAM auth modal — scoped under .auth-modal so we don't collide with Tailwind. */

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal[hidden] {
  display: none;
}

.auth-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55); /* slate-900 @ 55% */
  animation: auth-modal-fade 120ms ease-out;
}

.auth-modal__dialog {
  position: relative;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  padding: 24px 20px 20px;
  animation: auth-modal-rise 140ms ease-out;
}

.auth-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #64748b; /* slate-500 */
  cursor: pointer;
}

.auth-modal__close:hover,
.auth-modal__close:focus-visible {
  background: #f1f5f9; /* slate-100 */
  color: #0f172a;      /* slate-900 */
  outline: none;
}

.auth-modal__header {
  margin-bottom: 16px;
  padding-right: 32px; /* room for close button */
}

.auth-modal__title {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a; /* slate-900 */
  margin: 0 0 4px;
  line-height: 1.3;
}

.auth-modal__subtitle {
  font-size: 13px;
  color: #64748b; /* slate-500 */
  margin: 0;
  line-height: 1.45;
}

.auth-modal__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* --- Option button --- */
.auth-option {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #e2e8f0; /* slate-200 */
  background: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.auth-option:focus-visible {
  outline: 2px solid #b71234; /* brand-500 */
  outline-offset: 2px;
}

.auth-option__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  flex-shrink: 0;
  color: #334155; /* slate-700 */
}

.auth-option__label {
  flex: 1;
  min-width: 0;
}

.auth-option__badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 8px;
  border-radius: 9999px;
  background: #fde7e9; /* brand-100 */
  color: #720d20;      /* brand-700 */
  white-space: nowrap;
}

.auth-option__badge--available {
  background: #dcfce7; /* green-100 */
  color: #166534;      /* green-800 */
}

/* --- Enabled (GitHub) --- */
.auth-option--enabled:hover {
  background: #f8fafc; /* slate-50 */
  border-color: #cbd5e1; /* slate-300 */
}

/* --- Disabled placeholders --- */
.auth-option--disabled {
  background: #f1f5f9; /* slate-100 */
  color: #94a3b8;      /* slate-400 */
  cursor: not-allowed;
  border-color: #e2e8f0;
}

.auth-option--disabled .auth-option__icon {
  color: #94a3b8;
}

.auth-option--disabled:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

/* --- Mobile sheet --- */
@media (max-width: 480px) {
  .auth-modal {
    align-items: stretch;
    justify-content: stretch;
  }
  .auth-modal__dialog {
    width: 100%;
    max-width: 100vw;
    border-radius: 0;
    padding: 24px 20px env(safe-area-inset-bottom, 20px);
    margin-top: auto; /* anchor to bottom; full-height because parent is flex stretch */
    height: 100%;
    box-shadow: none;
    overflow-y: auto;
  }
  .auth-modal__title {
    font-size: 20px;
  }
}

/* --- Animations --- */
@keyframes auth-modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes auth-modal-rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-modal__overlay,
  .auth-modal__dialog {
    animation: none;
  }
}
