/* HERO */
.public-events-hero {
  margin: 1.5rem 0 1rem;
}

.public-events-hero h1 {
  margin: 0 0 0.3rem;
  font-size: 1.6rem;
}

.public-events-hero p {
  margin: 0;
  color: #4b5563;
}

/* GRID */
.public-events-section {
  margin-bottom: 2rem;
}

.public-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
}

/* CARD */
.public-event-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.public-event-card-header h2 {
  margin: 0 0 0.1rem;
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.public-event-card-body {
  font-size: 0.85rem;
  color: #111827;
  margin-top: 0.2rem;
}

.public-event-row {
  display: flex;
  gap: 0.25rem;
}

.public-event-row .label {
  font-weight: 600;
}

.public-event-row .value {
  color: #374151;
}

/* FOOTER */
.public-event-card-footer {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.public-event-details-btn {
  border-radius: 999px;
  border: none;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  background: #235385;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(35, 83, 133, 0.4);
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.public-event-details-btn:hover {
  background: #1d4a76;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(35, 83, 133, 0.5);
}

.public-event-availability {
  font-size: 0.85rem;
  color: #4b5563;
}

/* OVERLAY */
.public-event-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.public-event-overlay.open {
  display: flex;
}

.public-event-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.public-event-dialog {
  position: relative;
  z-index: 1;
  width: min(900px, 95vw);
  max-height: 95vh;
  background: #f9fafb;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  padding: 1.2rem 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.public-event-dialog-close {
  position: absolute;
  top: 0.7rem;
  right: 0.8rem;
  border: none;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
  color: #6b7280;
}

.public-event-dialog-header h2 {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  color: #111827;
}

.pe-datetime,
.pe-location,
.pe-price,
.pe-available {
  margin: 0;
  font-size: 0.9rem;
  color: #374151;
}

.public-event-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  overflow-y: auto;
}

.pe-map-wrapper {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.pe-map {
  width: 100%;
  height: 220px;
  border: none;
}

/* FORM */
.pe-form {
  margin-top: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.pe-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 0.8rem;
}

.pe-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.pe-field-full {
  grid-column: 1 / -1;
}

.pe-field label {
  font-size: 0.8rem;
  color: #4b5563;
}

.pe-field input,
.pe-field select {
  border-radius: 8px;
  border: 1px solid #d1d5db;
  padding: 0.4rem 0.55rem;
  font-size: 0.9rem;
  outline: none;
}

.pe-field input:focus,
.pe-field select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

/* Summary */
.pe-summary-box {
  margin-top: 0.3rem;
  border-radius: 10px;
  background: #f3f4f6;
  border: 1px dashed #d1d5db;
  padding: 0.5rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
}

.pe-summary-line {
  display: flex;
  justify-content: space-between;
}

/* Buttons */
.pe-actions {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.5rem;
}

.pe-btn-primary,
.pe-btn-secondary {
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
}

.pe-btn-primary {
  background: #235385;
  color: #ffffff;
}

.pe-btn-primary:hover {
  background: #1d4a76;
}

.pe-btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.pe-response {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: #111827;
}

/* Mobile */
@media (max-width: 768px) {
  .public-event-dialog {
    padding-inline: 1rem;
  }
  .pe-form-grid {
    grid-template-columns: 1fr;
  }
  .pe-map {
    height: 200px;
  }
}