/* WTA Scout — Wimbledon grass theme (custom Pico overrides + project-specific classes) */

:root[data-theme="dark"] {
  /* Backgrounds — medium dark gray, not near-black */
  --pico-background-color: #2a2d30;
  --pico-card-background-color: #34383c;
  --pico-card-sectioning-background-color: #34383c;
  --pico-form-element-background-color: #34383c;
  --pico-form-element-focus-color: rgba(106, 168, 79, 0.25);

  /* Borders — subtle, not harsh */
  --pico-muted-border-color: #44494e;
  --pico-form-element-border-color: #44494e;

  /* Primary accent — Wimbledon grass green */
  --pico-primary: #6aa84f;
  --pico-primary-background: #6aa84f;
  --pico-primary-border: #6aa84f;
  --pico-primary-hover: #7bb95f;
  --pico-primary-hover-background: #7bb95f;
  --pico-primary-hover-border: #7bb95f;
  --pico-primary-focus: rgba(106, 168, 79, 0.25);
  --pico-primary-inverse: #ffffff;
}

/* Brand in navigation */
.brand {
  font-weight: 700;
  text-decoration: none;
  color: var(--pico-color);
}

.brand:hover {
  color: var(--pico-primary);
}

/* Logout form — make submit button look like a regular nav link */
.logout-form {
  display: inline;
  margin: 0;
}

.logout-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--pico-color);
  cursor: pointer;
  font: inherit;
}

.logout-button:hover {
  color: var(--pico-primary);
}

/* Login card — centered, limited width */
.login-card {
  max-width: 420px;
  margin: 4rem auto;
}

/* Flash messages */
.error-alert {
  background-color: color-mix(in srgb, var(--pico-del-color) 15%, transparent);
  border: 1px solid var(--pico-del-color);
  color: var(--pico-del-color);
  padding: 0.75rem 1rem;
  border-radius: var(--pico-border-radius);
  margin-bottom: 1rem;
}

.success-alert {
  background-color: color-mix(in srgb, var(--pico-primary) 15%, transparent);
  border: 1px solid var(--pico-primary);
  color: var(--pico-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--pico-border-radius);
  margin-bottom: 1rem;
}

/* Footer */
.app-footer {
  margin-top: 4rem;
  padding: 1rem 0;
  border-top: 1px solid var(--pico-muted-border-color);
  color: var(--pico-muted-color);
  font-size: 0.875rem;
  text-align: center;
}

/* Active nav item */
nav a.active {
  color: var(--pico-primary);
  font-weight: 600;
}

/* Dashboard landing — clickable cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.dashboard-card {
  padding: 0;
  margin: 0;
}

.dashboard-card a {
  display: block;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border-radius: var(--pico-border-radius);
  transition: background-color 0.15s ease;
}

.dashboard-card a:hover {
  background-color: color-mix(in srgb, var(--pico-primary) 8%, transparent);
}

.dashboard-card h3 {
  margin: 0 0 0.25rem 0;
}

.dashboard-card p {
  margin: 0;
  color: var(--pico-muted-color);
}

/* Settings account info */
.account-info {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0;
}

.account-info dt {
  color: var(--pico-muted-color);
  font-weight: 500;
}

.account-info dd {
  margin: 0;
}

/* Admin users table */
.status-active {
  color: var(--pico-primary);
  font-weight: 500;
}

.status-inactive {
  color: var(--pico-del-color);
  font-weight: 500;
}

/* Toast container (Alpine-driven) */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  min-width: 220px;
  padding: 0.75rem 1rem;
  border-radius: var(--pico-border-radius);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: toast-in 0.2s ease-out;
  pointer-events: auto;
}

.toast-success { background-color: var(--pico-primary); }
.toast-error { background-color: var(--pico-del-color); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
