/* ==========================================================================
   Profile Page Styles — Aperture22
   Scandinavian minimal, light, card-based layout.
   Inherits design tokens from /styles.css.
   ========================================================================== */

/* ── Page Layout ──────────────────────────────────────────────────────────── */

#profile-section,
#auth-section {
  width: 100%;
}

/* ── Auth Card ────────────────────────────────────────────────────────────── */

.auth-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  max-width: 400px;
  margin: 2rem auto;
  padding: var(--space-xl);
}

/* ── Auth Mode Toggle ─────────────────────────────────────────────────────── */

.auth-toggle {
  display: flex;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3px;
  gap: 3px;
  margin-bottom: var(--space-lg);
}

.auth-toggle-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font-ui);
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.auth-toggle-btn--active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.auth-toggle-btn:hover:not(.auth-toggle-btn--active) {
  color: var(--color-text);
}

/* ── Form Elements ────────────────────────────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: var(--space-md);
}

.form-group label {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.form-group input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.95rem;
  font-family: var(--font-ui);
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-halo);
}

.form-group input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

/* ── Auth Error ───────────────────────────────────────────────────────────── */

.auth-error {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--color-danger);
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  margin-bottom: var(--space-md);
}

/* ── Button Variants ──────────────────────────────────────────────────────── */

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn--primary:hover {
  opacity: 0.85;
}

.btn--secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-bg);
  border-color: var(--color-accent);
}

.btn--full {
  width: 100%;
}

/* ── Profile Welcome ──────────────────────────────────────────────────────── */

.profile-welcome {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.profile-welcome h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 400;
  color: var(--color-text);
}

/* ── Profile Card ─────────────────────────────────────────────────────────── */

.profile-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-lg) var(--space-xl);
  margin-bottom: var(--space-lg);
  max-width: 640px;
  margin-inline: auto;
}

.profile-card-heading {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* ── Profile Info Table ───────────────────────────────────────────────────── */

.profile-info {
  display: grid;
  gap: 0;
}

.profile-info-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--space-sm);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  align-items: baseline;
}

.profile-info-row:last-child {
  border-bottom: none;
}

.profile-info dt {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.profile-info dd {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--color-text);
}

/* ── Camera Bag ───────────────────────────────────────────────────────────── */

.camera-bag-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.camera-bag-header .profile-card-heading {
  margin-bottom: 0;
}

.camera-bag-list {
  list-style: none;
}

.camera-bag-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--color-text);
}

.camera-bag-item:last-child {
  border-bottom: none;
}

.gear-label {
  font-size: 0.7rem;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.camera-bag-item-name {
  flex: 1;
}

.camera-bag-empty {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  padding: var(--space-md) 0;
  text-align: center;
}

/* ── Upload Stats ─────────────────────────────────────────────────────────── */

.profile-stats-note {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

/* ── Profile Actions ──────────────────────────────────────────────────────── */

.profile-actions {
  display: flex;
  justify-content: center;
  max-width: 640px;
  margin-inline: auto;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .auth-card {
    padding: var(--space-lg);
    margin: var(--space-md) auto;
  }

  .profile-card {
    padding: var(--space-md);
  }

  .profile-info-row {
    grid-template-columns: 110px 1fr;
  }

  .camera-bag-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}
