:root {
  --page-background: white;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: var(--page-background);
  padding: 20px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 40px 40px 0 40px;
  border: 2px solid #333;
  border-radius: 8px;
  position: relative;
  overflow: visible;
}


/* Breadcrumb navigation */
.breadcrumb {
  max-width: 600px;
  margin: 0 auto 1rem auto;
  padding: 40px 0 0 0;
}

.breadcrumb-link {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-link:hover {
  color: #0066cc;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .breadcrumb {
    padding: 0 20px;
  }
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #111;
}

h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  color: #111;
  border-bottom: 2px solid #333;
}

.section {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.section:last-of-type:not(.rsvp-section) {
  margin-bottom: 2.5rem;
}

.section:last-child {
  border-bottom: none;
}

.section-no-border {
  border-bottom: none;
}

#event-description p {
  margin-bottom: .5rem;
}

#event-description ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

#event-description strong {
  font-weight: 600;
}

#event-description em {
  font-style: italic;
}

#event-description a {
  color: #0066cc;
  text-decoration: none;
}

#event-description a:hover {
  text-decoration: underline;
}

.datetime-display {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.calendar-square {
  width: 56px;
  height: 56px;
  border: 2px solid #0066cc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex-shrink: 0;
  overflow: hidden;
  background: white;
}

.calendar-month {
  font-size: 0.55rem;
  font-weight: 600;
  color: white;
  background: #0066cc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0;
  text-align: center;
  line-height: 1;
}

.calendar-day {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0066cc;
  line-height: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.datetime-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.datetime-date {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
}

.datetime-time {
  font-size: 0.95rem;
  color: #0066cc;
}

.datetime-display {
  margin-bottom: 1.5rem;
}

.location-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.location-link {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.location-link:hover {
  opacity: 0.8;
}

.location-link:hover .location-address {
  text-decoration: underline;
}

.location-icon {
  width: 56px;
  height: 56px;
  border: 2px solid #0066cc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #0066cc;
}

.location-icon svg {
  width: 30px;
  height: 30px;
}

.location-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.location-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location-name {
  font-size: 1rem;
  font-weight: 600;
  color: #111;
}

.external-link-icon {
  color: #0066cc;
  flex-shrink: 0;
}

.location-address {
  font-size: 0.95rem;
  color: #0066cc;
}

#map {
  width: 100%;
  height: 300px;
  margin-top: 1rem;
  border: 2px solid #333;
  border-radius: 4px;
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #444;
}

input[type="email"],
input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #333;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
  outline: none;
  border-color: #0066cc;
}

input[type="checkbox"],
input[type="radio"] {
  margin-right: 0.5rem;
  cursor: pointer;
}

label {
  cursor: pointer;
}

button {
  cursor: pointer;
}

button[type="submit"] {
  width: 100%;
  padding: 1rem;
  background: #0066cc;
  color: white;
  border: 2px solid #333;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

button[type="submit"]:hover {
  background: #0052a3;
}

button[type="submit"]:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.error {
  color: #d9534f;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.success {
  color: #5cb85c;
  margin-top: 1rem;
  font-size: 0.9rem;
}

#payment-element {
  margin: 1.5rem 0;
}

/* Hide Stripe Link promotional message and all Link-related elements */
#payment-element .p-TermsText,
#payment-element .p-Terms,
#payment-element [data-testid="terms-card"],
#payment-element .p-LinkBanner,
#payment-element .p-LinkAuthButton,
#payment-element [class*="Link"],
#payment-element [class*="link"],
#payment-element iframe[name*="link"],
.p-Terms,
.p-TermsText {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

a {
  color: #0066cc;
  text-decoration: none;
  cursor: pointer;
}

a:hover {
  text-decoration: underline;
}

.section h2 {
  text-align: left;
}

/* RSVP Section Styles */
.rsvp-section {
  text-align: center;
  background: #f8f8f8;
  margin-bottom: 0 !important;
  margin-left: -40px;
  margin-right: -40px;
  padding-bottom: 0 !important;
  padding-top: 0;
  padding-left: 40px;
  padding-right: 40px;
  overflow: visible;
  border-radius: 0 0 6px 6px;
  border-top: none;
  background-image: repeating-linear-gradient(90deg, #333 0, #333 8px, transparent 8px, transparent 16px);
  background-size: 100% 2px;
  background-position: 0 0;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}

.rsvp-section::before,
.rsvp-section::after {
  content: '';
  position: absolute;
  top: -17px;
  width: 32px;
  height: 32px;
  background: var(--page-background);
  border: 2px solid #333;
  border-radius: 50%;
  z-index: 10;
}

.rsvp-section::before {
  left: -20px;
  clip-path: inset(0 0 0 50%);
}

.rsvp-section::after {
  right: -20px;
  clip-path: inset(0 50% 0 0);
}

.rsvp-section h2 {
  display: none;
}

.event-price {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1;
  padding: 4rem 0;
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: #111;
  line-height: 1;
}

.per-person {
  font-size: 0.9rem;
  font-weight: 400;
  color: #333;
  text-align: center;
}

#attendees-container {
  margin-bottom: 0;
}

.attendees-avatars {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.75rem;
  min-height: 50px;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 3px solid white;
  background: #0066cc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  margin-left: -12px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.avatar-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px dashed #999;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -12px;
  position: relative;
}

.avatar-placeholder:first-child {
  margin-left: 0;
}

.avatar:first-child {
  margin-left: 0;
}

.avatar.more {
  background: #333;
  font-size: 0.85rem;
}

.attendees-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
}

.attendees-count {
  font-size: 0.9rem;
  color: #444;
  font-weight: 500;
  margin: 0;
}

.event-capacity {
  font-size: 0.85rem;
  color: #999;
  margin: 0;
}

#capacity-only-container {
  margin-bottom: 0;
}

.rsvp-button {
  width: calc(100% + 80px);
  margin: 0 -40px;
  margin-top: auto;
  padding: 1.5rem;
  background: #0066cc;
  color: white;
  border: none;
  border-top: none;
  border-radius: 0 0 6px 6px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.rsvp-button:hover {
  background: #0052a3;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

.modal.active {
  display: block;
}

.modal-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 40px 80px 40px;
}

/* Booking modal needs more width for two-column layout */
#booking-modal .modal-content {
  max-width: 900px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.modal-header h1 {
  margin: 0;
}

.modal-close {
  background: #f8f8f8;
  border: 2px solid #333;
  border-radius: 8px;
  font-size: 2rem;
  color: #333;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  transition: background 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.modal-close:hover {
  color: #0066cc;
  border-color: #0066cc;
  background: #fff;
}

.booking-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1fr;
  gap: 3rem;
  margin-top: 2rem;
}

@media (min-width: 1200px) {
  .booking-layout {
    grid-template-columns: 380px 1fr;
  }
}

.cart-summary {
  background: #f8f8f8;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 1.5rem;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.summary-event-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.summary-event-date {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.summary-label {
  font-size: 0.95rem;
  color: #444;
}

.summary-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: #111;
  text-align: right;
}

.summary-divider {
  border-top: 2px solid #333;
  margin: 1.5rem 0;
}

.summary-total {
  margin-bottom: 0;
}

.summary-total .summary-label {
  font-size: 1.1rem;
  font-weight: 600;
  color: #111;
}

.summary-total .summary-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
}

.booking-form-container {
  flex: 1;
}

@media (max-width: 768px) {
  .booking-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cart-summary {
    position: static;
    order: -1;
  }
}

/* Success Modal Styles */
.success-modal-content {
  max-width: 600px;
}

.success-header {
  text-align: center;
  margin-bottom: 2rem;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #5cb85c;
  color: white;
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-weight: 700;
}

.success-header h1 {
  margin-bottom: 0.5rem;
  color: #111;
}

.success-subtitle {
  font-size: 1rem;
  color: #666;
  margin: 0;
}

.success-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
  max-width: 100%;
  overflow: hidden;
}

.success-event-card {
  background: #f8f8f8;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 1.5rem;
  overflow: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.success-event-card h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #111;
}

.success-event-card .datetime-display {
  margin-bottom: 1.5rem;
}

.success-location-link {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.success-location-link:hover {
  opacity: 0.8;
}

.success-location-link:hover .location-address {
  text-decoration: underline;
}

.success-event-card .location-display {
  margin-bottom: 1rem;
}

#success-map {
  width: 100%;
  max-width: 100%;
  height: 250px;
  margin-top: 1rem;
  margin-bottom: 0;
  border: 2px solid #333;
  border-radius: 4px;
  box-sizing: border-box;
}

.success-order-card {
  background: #f8f8f8;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 1.5rem;
}

.success-order-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 1rem;
}

.add-to-calendar-button {
  width: 100%;
  padding: 1rem;
  background: white;
  color: #0066cc;
  border: 2px solid #0066cc;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
}

.add-to-calendar-button:hover {
  background: #f0f7ff;
}

.success-close-button {
  width: 100%;
  padding: 1rem;
  background: #0066cc;
  color: white;
  border: 2px solid #333;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.success-close-button:hover {
  background: #0052a3;
}

@media (max-width: 640px) {
  .container {
    padding: 20px 20px 0 20px;
  }

  .rsvp-section {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .rsvp-section::before {
    left: -20px;
  }

  .rsvp-section::after {
    right: -20px;
  }

  .event-price {
    padding: 3.5rem 0;
  }

  .rsvp-button {
    width: calc(100% + 40px);
    margin: 0 -20px;
    margin-top: auto;
  }

  h1 {
    font-size: 1.5rem;
  }

  .modal-content {
    padding: 40px 20px 80px 20px;
  }

  .success-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }

  .success-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .success-label {
    min-width: auto;
  }

  .success-value {
    text-align: left;
  }
}

/* Homepage container - no border */
.homepage-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Event list styles */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.event-card:hover .event-card-name {
  text-decoration: underline;
}

.event-card-past {
  opacity: 0.5;
}

.event-card-calendar {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 2px solid #0066cc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  background: white;
}

.event-card-past .event-card-calendar {
  border-color: #999;
}

.event-card-month {
  font-size: 0.55rem;
  font-weight: 600;
  color: white;
  background: #0066cc;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.1rem 0;
  text-align: center;
}

.event-card-past .event-card-month {
  background-color: #999;
}

.event-card-day {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  color: #333;
  padding-bottom: 0.15rem;
}

.event-card-past .event-card-day {
  color: #999;
}

.event-card-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.event-card-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

.event-card-past .event-card-name {
  color: #999;
}

.event-card-datetime {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.4;
}

.event-card-past .event-card-datetime {
  color: #999;
}

.event-card-time {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.4;
}

.event-card-past .event-card-time {
  color: #999;
}

.event-card-location {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.4;
}

.event-card-past .event-card-location {
  color: #999;
}

@media (max-width: 640px) {
  .homepage-container {
    padding: 20px;
  }

  .event-card {
    padding: 0.75rem;
  }

  .event-card-calendar {
    width: 50px;
    height: 50px;
  }

  .event-card-day {
    font-size: 1.25rem;
  }

  .event-card-name {
    font-size: 1rem;
  }
}
