/*
 * Scenery Account Portal — Styles
 *
 * Uses Tailwind CSS via CDN (configured in index.html).
 * This file contains component-level styles that are too complex
 * for utility classes or need to be reused across views.
 *
 * Design tokens match the Scenery landing page (scenery.app):
 * - Primary: #0C55FF (blue)
 * - Gray ultradark: #23252A (near-black, text)
 * - Gray dark: #4D4F53
 * - Gray medium: #8E9093
 * - Gray light: #E2E3E4
 * - Gray ultralight: #F5F6F7
 * - Brand dark: #1C1E1E
 * - Font: system-ui stack (SF Pro / Inter)
 */

/* --- Loading spinner (Apple-style) --- */

.loading-spinner {
  width: 20px;
  height: 20px;
  position: relative;
  animation: spinner-rotate 1s linear infinite;
}

.loading-spinner::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: #8E9093;
  border-right-color: rgba(142, 144, 147, 0.3);
  border-bottom-color: rgba(142, 144, 147, 0.1);
  border-left-color: rgba(142, 144, 147, 0.1);
  box-sizing: border-box;
}

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

/* --- Form inputs --- */

.input-field {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: #23252A;
  background-color: #F5F6F7;
  border: 1px solid #E2E3E4;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-field::placeholder {
  color: #8E9093;
}

.input-field:focus {
  border-color: #0C55FF;
  box-shadow: 0 0 0 3px rgba(12, 85, 255, 0.1);
}

.input-field:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Buttons --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  background-color: #0C55FF;
}

.btn-primary:hover:not(:disabled) {
  background-color: #0A47D6;
}

.btn-secondary {
  color: #23252A;
  background-color: #F5F6F7;
  border: 1px solid #E2E3E4;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #E2E3E4;
}

.btn-apple {
  color: #fff;
  background-color: #000;
  font-size: 0.9375rem;
}

.btn-apple:hover:not(:disabled) {
  background-color: #1a1a1a;
}

.btn-apple svg {
  width: 18px;
  height: 18px;
}

.btn-block {
  width: 100%;
}

/* --- Card container --- */

.card {
  background-color: #fff;
  border: 1px solid #E2E3E4;
  border-radius: 12px;
  padding: 2rem;
}

/* --- Divider with text --- */

.divider-text {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #8E9093;
  font-size: 0.8125rem;
}

.divider-text::before,
.divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #E2E3E4;
}

/* --- Alert messages --- */

.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.alert-error {
  color: #991B1B;
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
}

.alert-success {
  color: #166534;
  background-color: #F0FDF4;
  border: 1px solid #BBF7D0;
}

.alert-info {
  color: #1E40AF;
  background-color: #EFF6FF;
  border: 1px solid #BFDBFE;
}

/* --- Success checkmark --- */

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #F0FDF4;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  color: #16A34A;
}

/* --- Status badge --- */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-active {
  color: #166534;
  background-color: #F0FDF4;
  border: 1px solid #BBF7D0;
}

.badge-expired {
  color: #6B7280;
  background-color: #F5F6F7;
  border: 1px solid #E2E3E4;
}
