/* Public Template Styles */

/* trongate.css applies `width: 100%; display: block; margin: .5em 0` to
   every <button> at max-width 550px — neutralise that for the drawer's
   icon button so it stays compact. Use margin-block (not margin) so the
   `ml-auto` Tailwind utility on the button can still push it right. */
#mobile-menu-close {
  width: auto;
  display: inline-flex;
  margin-block: 0;
}

/* ── Base layout ─────────────────────────────────────── */
.pub-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f9fafb;
  color: #374151;
}

/* ── Header ──────────────────────────────────────────── */
.pub-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.pub-header-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pub-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.pub-logo img {
  height: 2.5rem;
  width: auto;
}

.pub-logo-dark {
  display: none;
}

.pub-logo-title {
  display: none;
}

.pub-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.pub-nav-desktop {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

.pub-nav a {
  padding: 0.5rem 0.75rem;
  color: #374151;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: background 0.15s, color 0.15s;
}

.pub-nav a:hover {
  background: #f3f4f6;
  color: #111827;
}

.pub-nav-login {
  display: none;
  margin-left: 0.5rem;
}

.pub-nav-login a {
  background: transparent;
  color: var(--primary) !important;
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--primary);
  border-radius: 0.375rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.pub-nav-login a:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

.pub-nav-register {
  display: none;
  margin-left: 0.5rem;
}

.pub-nav-register a {
  background: var(--primary);
  color: #fff !important;
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--primary);
  border-radius: 0.375rem;
  font-weight: 600;
}

.pub-nav-register a:hover {
  background: var(--primary-dark) !important;
}

.pub-btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff !important;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  font-weight: 600;
  text-decoration: none !important;
}

.pub-btn-primary:hover {
  background: var(--primary-dark);
}

.pub-nav-icon {
  display: none;
  padding: 0.5rem;
  color: #6b7280;
  cursor: pointer;
  border-radius: 0.375rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  align-items: center;
}

.pub-nav-icon:hover {
  background: #f3f4f6;
  color: #111827;
}

.pub-nav-icon .tg {
  font-size: 1.125rem;
}

/* ── Theme toggle ────────────────────────────────────── */
button.pub-theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin: 0;
  color: #6b7280;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

button.pub-theme-toggle:hover {
  background: #f3f4f6;
  border: none;
  color: #111827;
}

button.pub-theme-toggle .tg {
  font-size: 1.125rem;
}

.pub-icon-sun { display: none; }
.pub-icon-moon { display: inline-block; }
.dark .pub-icon-sun { display: inline-block; }
.dark .pub-icon-moon { display: none; }

/* ── Hamburger (mobile) ─────────────────────────────── */
button.pub-hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin: 0;
  color: #6b7280;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

button.pub-hamburger:hover {
  background: #f3f4f6;
  border: none;
  color: #111827;
}

button.pub-hamburger .tg {
  font-size: 1.25rem;
}

/* ── Mobile menu ─────────────────────────────────────── */
.pub-mobile-menu {
  display: none;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem 1.5rem 1rem;
}

.pub-mobile-menu.open {
  display: block;
}

.pub-mobile-menu a {
  display: block;
  padding: 0.625rem 0;
  color: #374151;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  border-bottom: 1px solid #f3f4f6;
}

.pub-mobile-menu a:last-child {
  border-bottom: none;
}

.pub-mobile-menu a:hover {
  color: var(--primary);
}

/* ── Hero ────────────────────────────────────────────── */
.pub-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  padding: 4rem 1.5rem;
  overflow: hidden;
}

.pub-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.pub-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  max-width: 48rem;
  margin: 0 auto;
}

.pub-hero-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

.pub-hero-content p {
  font-size: 1rem;
  margin: 0.25rem 0;
  opacity: 0.9;
}

.pub-hero-cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 2rem;
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}

.pub-hero-cta:hover {
  background: #f3f4f6;
  transform: translateY(-1px);
}

/* ── Hero Countdown ─────────────────────────────────── */
.pub-hero-countdown {
  margin-top: 1.25rem;
  text-align: center;
}

.pub-hero-countdown-label {
  font-size: 0.9375rem;
  opacity: 0.9;
  margin: 0 0 0.75rem;
}

.pub-hero-countdown-blocks {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.pub-countdown-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 4rem;
}

.pub-countdown-block strong {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.pub-countdown-block span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

/* ── Hero Status Message ────────────────────────────── */
.pub-hero-status {
  margin-top: 1.25rem;
  font-size: 1rem;
  opacity: 0.9;
}

/* ── Hero Subscribe Form ────────────────────────────── */
.pub-hero-subscribe {
  margin-top: 1.5rem;
}

.pub-hero-subscribe-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  max-width: 28rem;
  margin: 0 auto;
}

.pub-hero-subscribe-input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 9999px;
  font-size: 0.9375rem;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  outline: none;
}

.pub-hero-subscribe-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.pub-hero-subscribe-input:focus {
  background: rgba(255, 255, 255, 0.25);
}

button.pub-hero-subscribe-btn {
  background: #fff;
  color: var(--primary);
  border: none;
  margin: 0;
  padding: 0.75rem 2rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.15s;
}

button.pub-hero-subscribe-btn:hover {
  background: #f3f4f6;
  border: none;
  margin: 0;
  transform: translateY(-1px);
}

.pub-hero-subscribe-msg {
  font-size: 0.9375rem;
  margin: 0;
  padding: 0.75rem 0;
  opacity: 0.95;
}

.pub-hero-subscribe-error {
  color: #fca5a5;
}

/* ── Content grid ────────────────────────────────────── */
.pub-content-section {
  flex: 1;
  padding: 2rem 1.5rem;
}

.pub-content-wrap {
  max-width: 80rem;
  margin: 0 auto;
}

.pub-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

.pub-grid-main {
  min-width: 0;
}

/* ── Sidebar ─────────────────────────────────────────── */
.pub-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pub-sidebar-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}


/* ── Cards ───────────────────────────────────────────── */
.pub-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  padding: 1.25rem;
}

.pub-card h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.pub-card-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.pub-card-row:last-child {
  border-bottom: none;
}

.pub-card-row .tg {
  flex-shrink: 0;
  font-size: 1rem;
  margin-top: 0.125rem;
  color: var(--accent, var(--primary));
}

.pub-card-row-content {
  flex: 1;
  min-width: 0;
}

.pub-card-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
}

.pub-card-value {
  font-size: 0.8125rem;
  color: #6b7280;
}


/* Prose styles moved to css/input.css */

/* Event picker styles moved to Tailwind utilities in view file */

/* ── Footer ──────────────────────────────────────────── */
.pub-footer {
  background: #1f2937;
  color: #9ca3af;
  padding: 1.5rem;
  font-size: 0.8125rem;
  margin-top: auto;
}

.pub-footer-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.pub-footer a {
  color: var(--primary);
  text-decoration: none;
}

.pub-footer a:hover {
  text-decoration: underline;
}

.pub-footer-links {
  display: flex;
  gap: 1rem;
}

.pub-footer-links a {
  color: #9ca3af;
}

.pub-footer-links a:hover {
  color: #d1d5db;
}

/* Teams page styles moved to Tailwind utilities in view file */

/* Venues page styles moved to Tailwind utilities in view file */

/* ── Dark mode ───────────────────────────────────────── */
.dark .pub-page {
  background: #111827;
  color: #d1d5db;
}

.dark .pub-header {
  background: #1f2937;
  border-bottom-color: #374151;
}

.dark .pub-logo-title {
  color: var(--primary);
}

.dark .pub-logo-light {
  display: none;
}

.dark .pub-logo-dark {
  display: block;
}

.dark .pub-logo-only {
  background: rgba(255, 255, 255, 0.9);
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
}

.dark .pub-nav a {
  color: #d1d5db;
}

.dark .pub-nav a:hover {
  background: #374151;
  color: #f9fafb;
}

.dark .pub-nav-icon {
  color: #9ca3af;
}

.dark .pub-nav-icon:hover {
  background: #374151;
  color: #f9fafb;
}

.dark button.pub-theme-toggle {
  color: #9ca3af;
}

.dark button.pub-theme-toggle:hover {
  background: #374151;
  border: none;
  color: #f9fafb;
}

.dark button.pub-hamburger {
  color: #9ca3af;
}

.dark button.pub-hamburger:hover {
  background: #374151;
  border: none;
  color: #f9fafb;
}

.dark .pub-mobile-menu {
  background: #1f2937;
  border-bottom-color: #374151;
}

.dark .pub-mobile-menu a {
  color: #d1d5db;
  border-bottom-color: #374151;
}

.dark .pub-mobile-menu a:hover {
  color: var(--primary);
}

.dark .pub-card {
  background: #1f2937;
  border-color: #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.dark .pub-card h3 {
  color: #f9fafb;
}

.dark .pub-card-row {
  border-bottom-color: #374151;
}

.dark .pub-card-label {
  color: #d1d5db;
}

.dark .pub-card-value {
  color: #9ca3af;
}


/* Dark: generic tables (CMS content, etc.) */
.dark th {
  background-color: #1f2937;
  color: #d1d5db;
}

.dark th,
.dark td {
  border-color: #374151;
  color: #d1d5db;
}

.dark tr:nth-child(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}

.dark tr:hover,
.dark tr:nth-child(odd):hover {
  background-color: rgba(255, 255, 255, 0.06);
}

/* Override generic dark rules for pub-table headers */
.dark .pub-table th {
  background-color: var(--primary);
  color: #fff;
}

.dark .pub-table thead tr,
.dark .pub-table thead tr:nth-child(odd) {
  background-color: transparent;
}

.dark .pub-table td:first-child {
  color: #fff;
}

/* Override generic dark rules for table-header rows */
.dark .table-header th {
  background-color: var(--primary);
  color: #fff;
}

.dark .table-header,
.dark .table-header:nth-child(odd) {
  background-color: var(--primary);
}


.dark .pub-footer {
  background: #0f172a;
}


/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 767px) {
  .pub-sidebar {
    order: -1;
  }

  .pub-card-dates {
    display: none;
  }

  .pub-hero-countdown-blocks {
    flex-wrap: wrap;
  }

  .pub-countdown-block {
    min-width: calc(50% - 0.5rem);
  }

  .pub-hero-subscribe-row {
    flex-direction: column;
  }

  button.pub-hero-subscribe-btn {
    width: 100%;
  }

}

@media (min-width: 768px) {
  .pub-nav-desktop {
    display: flex;
  }

  .pub-nav-icon {
    display: flex;
  }

  .pub-logo-title {
    display: block;
    margin-left: 0.75rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pub-nav-login {
    display: block;
  }

  .pub-nav-register {
    display: block;
  }

  button.pub-hamburger {
    display: none;
  }

  .pub-hero-content h1 {
    font-size: 2.75rem;
  }

  .pub-grid {
    grid-template-columns: 2fr 1fr;
  }

  .pub-grid-full {
    grid-template-columns: 1fr;
  }

  .pub-sidebar {
    position: sticky;
    top: 5rem;
    align-self: start;
  }

  .pub-footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .pub-hero-content h1 {
    font-size: 3rem;
  }

  .pub-hero {
    padding: 5rem 1.5rem;
  }
}
/* Contact and FAQ styles moved to Tailwind utilities in their respective view files */

/* ── CMS Preview Banner (shown on public pages for admin draft preview) ── */
.cms-preview-banner {
  background-color: #fef3c7;
  color: #92400e;
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.dark .cms-preview-banner {
  background-color: #78350f;
  color: #fcd34d;
}
