/*
 * ReserveYourSlot — app identity design system.
 *
 * Governs the app's own chrome only (marketing pages, dashboard, forms,
 * auth screens): light/creamy palette, one restrained accent color used
 * sparingly, a small type scale, and a spacing scale. See docs/style-note.md
 * for the rationale.
 *
 * This file must NEVER be used on the public event page — that surface is
 * themed per-event by the organizer via event-theme.css instead.
 */

:root {
  /* Palette: warm off-whites/neutrals as the base, one accent used sparingly. */
  --ry-cream-50: #fbf8f2;
  --ry-cream-100: #f5efe4;
  --ry-cream-200: #ece2d0;
  --ry-border: #e4d9c6;
  --ry-ink-900: #2b2620;
  --ry-ink-600: #6b6255;
  --ry-ink-400: #9a917f;
  --ry-accent-500: #c9682b;
  --ry-accent-600: #a8551f;
  --ry-accent-100: #f5e1d0;
  --ry-danger: #b3413a;
  --ry-success: #4f7a52;

  /* Type scale (system fonts only — no webfont download, keeps pages fast). */
  --ry-font-display: -apple-system, "Segoe UI", system-ui, sans-serif;
  --ry-font-body: -apple-system, "Segoe UI", system-ui, sans-serif;

  /* Spacing scale, rem-based. */
  --ry-space-1: 0.25rem;
  --ry-space-2: 0.5rem;
  --ry-space-3: 0.75rem;
  --ry-space-4: 1rem;
  --ry-space-5: 1.5rem;
  --ry-space-6: 2rem;
  --ry-space-7: 3rem;
  --ry-space-8: 4rem;

  --ry-radius: 0.75rem;
  --ry-radius-sm: 0.5rem;
}

body {
  background-color: var(--ry-cream-50);
  color: var(--ry-ink-900);
  font-family: var(--ry-font-body);
  letter-spacing: -0.01em;
}

.ry-display {
  font-family: var(--ry-font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* --- Navbar ---------------------------------------------------------- */

.ry-navbar {
  background-color: var(--ry-cream-50);
  border-bottom: 1px solid var(--ry-border);
}

.ry-navbar .navbar-brand {
  font-family: var(--ry-font-display);
  font-weight: 700;
  color: var(--ry-ink-900);
  display: flex;
  align-items: center;
  gap: var(--ry-space-2);
}

.ry-navbar .navbar-brand svg {
  height: 1.75rem;
  width: 1.75rem;
}

/* --- Buttons ----------------------------------------------------------- */

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

.btn-ry-accent:hover,
.btn-ry-accent:focus {
  background-color: var(--ry-accent-600);
  border-color: var(--ry-accent-600);
  color: #fff;
}

.btn-ry-outline {
  background-color: transparent;
  border-color: var(--ry-border);
  color: var(--ry-ink-900);
}

.btn-ry-outline:hover {
  border-color: var(--ry-accent-500);
  color: var(--ry-accent-600);
}

/* --- Dashboard: per-event action links -----------------------------------
   A <form>-wrapped button (Duplicate, Publish/Unpublish) must look and lay
   out exactly like the plain <a> links next to it, so the form itself is
   taken out of layout via display:contents and its button becomes a direct
   flex item alongside the links. */

.ry-inline-actions form {
  display: contents;
}

.ry-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0.35rem 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ry-ink-600);
  text-decoration: none;
}

.ry-action-link:hover,
.ry-action-link:focus {
  color: var(--ry-accent-600);
  text-decoration: underline;
}

/* --- Cards / surfaces ---------------------------------------------------- */

.ry-card {
  background-color: #fff;
  border: 1px solid var(--ry-border);
  border-radius: var(--ry-radius);
  padding: var(--ry-space-5);
}

.ry-event-row {
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ry-event-row:hover,
.ry-event-row:focus {
  border-color: var(--ry-accent-500);
  box-shadow: 0 0.25rem 0.75rem rgba(43, 38, 32, 0.08);
  color: inherit;
}

.ry-muted {
  color: var(--ry-ink-600);
}

.ry-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--ry-space-1);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--ry-cream-200);
  color: var(--ry-ink-600);
}

.ry-badge-accent {
  background-color: var(--ry-accent-100);
  color: var(--ry-accent-600);
}

/* --- Forms ------------------------------------------------------------ */

.form-control,
.form-select {
  border-color: var(--ry-border);
  border-radius: var(--ry-radius-sm);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ry-accent-500);
  box-shadow: 0 0 0 0.2rem var(--ry-accent-100);
}

/* --- Hero / marketing ---------------------------------------------------- */

.ry-hero {
  padding: var(--ry-space-8) 0;
}

/* --- Mobile-first touch targets ------------------------------------------ */

.btn {
  min-height: 2.75rem;
}

@media (max-width: 575.98px) {
  .ry-hero {
    padding: var(--ry-space-6) 0;
  }
}

/* --- Auth pages (django-allauth) --------------------------------------- */
/* See templates/allauth/layouts/base.html for why <main> itself is styled
   as the card, rather than wrapping a block allauth's templates control. */

.ry-auth-page main {
  max-width: 28rem;
  margin: var(--ry-space-7) auto;
  padding: var(--ry-space-6) var(--ry-space-5);
  background: #fff;
  border: 1px solid var(--ry-border);
  border-radius: var(--ry-radius);
}

@media (max-width: 575.98px) {
  .ry-auth-page main {
    margin: var(--ry-space-5) var(--ry-space-4);
    padding: var(--ry-space-5) var(--ry-space-4);
  }
}

/* django-allauth's own widgets don't carry Bootstrap classes (see
   allauth/elements/fields.html) — style them by context instead. */
.ry-auth-page input[type="text"],
.ry-auth-page input[type="email"],
.ry-auth-page input[type="password"],
.ry-auth-page input[type="tel"] {
  display: block;
  width: 100%;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--ry-border);
  border-radius: var(--ry-radius-sm);
  font-size: 1rem;
}

.ry-auth-page input:focus {
  outline: none;
  border-color: var(--ry-accent-500);
  box-shadow: 0 0 0 0.2rem var(--ry-accent-100);
}

/* --- Notifications (success/info toasts) -------------------------------- */

.ry-toast-container {
  position: fixed;
  top: var(--ry-space-4);
  right: var(--ry-space-4);
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: var(--ry-space-2);
  max-width: 22rem;
}

.ry-toast-container .ry-toast {
  background-color: #e5f2e6;
  border-color: #c3ddc5;
  color: var(--ry-success);
  box-shadow: 0 0.5rem 1.5rem rgba(43, 38, 32, 0.12);
}

@media (max-width: 575.98px) {
  .ry-toast-container {
    left: var(--ry-space-4);
    right: var(--ry-space-4);
    max-width: none;
  }
}
