/* Captive Portal — Chalkboard Base Theme */

@font-face {
  font-family: 'Hobo Std';
  src: url('/fonts/HoboStd.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--primary);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  line-height: 1.5;
}

body.has-bg {
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Container */
.portal-container {
  width: 100%;
  max-width: 440px;
}

/* Card */
.portal-card {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Logo */
.logo-wrap {
  text-align: center;
  margin-bottom: 1.25rem;
}

.venue-logo {
  max-height: 80px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
}

/* Typography */
.venue-title {
  text-align: center;
  font-family: 'Hobo Std', 'Comic Sans MS', cursive;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

h1 {
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.25rem;
}

.accent {
  color: var(--accent);
}

.subtitle {
  text-align: center;
  opacity: 0.65;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Form */
.form-row {
  display: flex;
  gap: 0.75rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  opacity: 0.8;
  letter-spacing: 0.02em;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder {
  color: var(--text);
  opacity: 0.3;
}

input[type="date"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
  color-scheme: dark;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}

/* Checkbox */
.checkbox-group {
  margin: 1.25rem 0 0.75rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

/* Legal */
.legal-text {
  font-size: 0.72rem;
  opacity: 0.4;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* Button */
.btn-connect {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn-connect:hover {
  opacity: 0.88;
}

.btn-connect:active {
  transform: scale(0.98);
}

/* Error box */
.error-box {
  background: rgba(233, 69, 96, 0.15);
  border: 1px solid rgba(233, 69, 96, 0.35);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.error-box p + p {
  margin-top: 0.25rem;
}

/* Success page */
.success-card {
  text-align: center;
}

.success-icon {
  margin-bottom: 1rem;
}

.success-card h1 {
  margin-bottom: 0.75rem;
}

.success-card p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.redirect-msg {
  opacity: 0.5;
  font-size: 0.8rem !important;
  margin: 1rem 0 !important;
}

.success-card .btn-connect {
  margin-top: 0.5rem;
}

/* Error page */
.error-card {
  text-align: center;
}

.error-icon {
  margin-bottom: 1rem;
}

.error-card h1 {
  margin-bottom: 0.75rem;
}

.error-card p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.help-text {
  opacity: 0.55;
  font-size: 0.85rem !important;
  margin-top: 1rem !important;
}

/* Venue picker */
.picker-title {
  margin-bottom: 0.25rem;
}

.venue-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.venue-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  min-height: 64px;
  transition: opacity 0.2s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}

.venue-btn:hover {
  opacity: 0.88;
}

.venue-btn:active {
  transform: scale(0.98);
}

.venue-btn-logo {
  max-height: 40px;
  max-width: 180px;
  object-fit: contain;
}

.venue-btn-name {
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

/* Responsive */
@media (max-width: 480px) {
  .portal-card {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  h1 {
    font-size: 1.2rem;
  }
}
