/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --color-bg: #fafafa;
  --color-surface: #fff;
  --color-text: #1a1a1a;
  --color-muted: #6b7280;
  --color-accent: #4f46e5;
  --color-accent-hover: #4338ca;
  --color-border: #e5e7eb;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}

.navbar-brand:hover {
  color: var(--color-text);
  text-decoration: none;
}

.navbar-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-email {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Typography */
h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Content sections */
.content-section {
  margin-top: 1.5rem;
}

.content-section .owner-list,
.content-section .attendee-list {
  margin-bottom: 0;
}

/* Links */
a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* Back link */
.back-link {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.back-link:hover {
  color: var(--color-accent);
}

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.page-header h1 {
  margin-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.5;
}

.btn:hover {
  text-decoration: none;
}

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

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

.btn-small {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
}

/* Auth pages */
.auth-subtitle {
  color: var(--color-muted);
  margin-bottom: 1rem;
}

.auth-confirmation {
  text-align: center;
  padding: 2rem 0;
}

.auth-confirmation p {
  margin-top: 0.5rem;
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

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

.form-group input,
.form-group textarea {
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-actions {
  margin-top: 0.5rem;
}

.form-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  color: #991b1b;
  font-size: 0.875rem;
}

.form-errors ul {
  margin-top: 0.25rem;
  padding-left: 1.25rem;
}

/* Owner & attendee lists */
.owner-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}

.owner-list li {
  font-size: 0.875rem;
  color: var(--color-muted);
  background: var(--color-bg);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.attendee-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
  margin-bottom: 1.5rem;
}

.attendee-list li {
  font-size: 0.875rem;
  color: var(--color-text);
  background: var(--color-surface);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.guest-count {
  font-size: 0.75rem;
  color: var(--color-accent);
  font-weight: 600;
}

/* Join section */
.join-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.join-form {
  margin-top: 0.5rem;
}

.join-hint {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.join-confirmation {
  text-align: center;
  padding: 1rem 0;
}

/* Event list */
.event-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.15s ease;
}

.event-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.event-card a {
  font-weight: 600;
  font-size: 1.05rem;
}

.event-meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.event-meta span + span::before {
  content: " · ";
}

/* Event detail */
.event-detail dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin-bottom: 1.5rem;
}

.event-detail dt {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.event-detail dd {
  font-size: 0.95rem;
}

.event-detail .description {
  margin-top: 1rem;
  line-height: 1.7;
}

/* Invite link */
.invite-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.invite-link-box {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.invite-link-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font-family: monospace;
}

.invite-hint {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 0.35rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-muted);
  font-size: 1rem;
}
