:root {
  --shad-primary: 59 130 246;
  --shad-primary-dark: 29 78 216;
  --shad-secondary: 139 92 246;
  --shad-success: 34 197 94;
  --shad-warning: 245 158 11;
  --shad-error: 239 68 68;
  --shad-border: 226 232 240;
  --shad-input: 226 232 240;
  --shad-ring: 59 130 246;
  --shad-radius: 0.5rem;
}

.kervio-glass {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(13.2px);
  -webkit-backdrop-filter: blur(13.2px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.shabbat250-form-wrapper {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  background: white;
  border-radius: var(--shad-radius);
  box-shadow:
    0 1px 3px 0 rgb(0 0 0 / 0.1),
    0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.shabbat250-form-header {
  text-align: center;
  margin-bottom: 2rem;
}

.shabbat250-form-header h2 {
  font-size: 2rem;
  color: rgb(15 23 42);
  margin-bottom: 0.5rem;
}

.shabbat250-form-header p {
  color: rgb(100 116 139);
  font-size: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(15 23 42);
  margin-bottom: 0.5rem;
}

.required {
  color: rgb(239 68 68);
}

.form-hint {
  font-size: 0.875rem;
  color: rgb(100 116 139);
  margin-top: -0.25rem;
  margin-bottom: 0.75rem;
}

input[type="text"],
input[type="email"],
select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid rgb(var(--shad-input));
  border-radius: calc(var(--shad-radius) - 2px);
  background: white;
  transition: all 0.2s;
}

input:focus,
select:focus {
  outline: none;
  border-color: rgb(var(--shad-ring));
  box-shadow: 0 0 0 3px rgb(var(--shad-ring) / 0.1);
}

/* Commitment Chips */
.commitment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.chip-content {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 2px solid rgb(var(--shad-border));
  border-radius: 9999px;
  background: white;
  color: rgb(71 85 105);
  transition: all 0.2s;
  user-select: none;
}

.chip input:checked + .chip-content {
  background: rgb(var(--shad-primary));
  border-color: rgb(var(--shad-primary));
  color: white;
}

.chip:hover .chip-content {
  border-color: rgb(var(--shad-primary));
}

/* Dedication Section */
.dedication-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgb(71 85 105);
}

.dedication-toggle input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
}

.dedication-fields {
  margin-top: 1rem;
  padding: 1rem;
  background: rgb(248 250 252);
  border-radius: calc(var(--shad-radius) - 2px);
  border: 1px solid rgb(var(--shad-border));
}

.dedication-type-selector {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
}

.radio-option input[type="radio"] {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-family: "Instrument Serif";
  font-weight: 400;
  color: white;
  background: #b50000;
  border: none;
  border-radius: var(--shad-radius);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 1rem;
}

.btn-submit:hover {
  background: #c00;
  transform: translateY(-1px);
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit svg {
  transition: transform 0.2s;
}

.btn-submit:hover svg {
  transform: translateX(3px);
}

/* Cloudflare Turnstile */
.cf-turnstile {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
}

/* SweetAlert2 Custom Styles */
.swal2-popup {
  border-radius: var(--shad-radius) !important;
}

.swal2-styled {
  border-radius: calc(var(--shad-radius) - 2px) !important;
  padding: 0.625rem 1.25rem !important;
  font-weight: 600 !important;
}

#swal2-title {
  font-weight: 400;
}

/* ================================
   PARTICIPANT CARDS
   ================================ */

.participant-card {
  padding: 20px;
  transition: all 0.3s ease;
}

.participant-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
  border-color: rgb(59 130 246);
}

.participant-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.participant-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #750000 0%, #590000 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.participant-info {
  flex: 1;
  min-width: 0;
}

.participant-name {
  font-size: 18px;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.participant-location {
  font-size: 14px;
  color: #ffffff99;
  margin: 4px 0 0 0;
}

.participant-commitments {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.commitment-icon {
  font-size: 20px;
  cursor: help;
}

.participant-dedication {
  font-size: 13px;
  color: #ffffff85;
}

/* ================================
   GRID LAYOUTS
   ================================ */

.shabbat250-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 40px 0;
}

@media (max-width: 1024px) {
  .shabbat250-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .shabbat250-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ================================
   TEXT BANNER (INFINITE SCROLL)
   ================================ */

.shabbat250-text-banner {
  width: 100%;
  overflow: hidden;
}

.banner-text-track {
  display: inline-flex;
  white-space: nowrap;
  animation: scroll-text 90s linear infinite;
  color: white;
  font-size: 18px;
  font-weight: 500;
}

.banner-text-track:hover {
  animation-play-state: paused;
}

.banner-item {
  display: inline;
  margin-right: 8px;
}

.banner-separator {
  color: #dc2626;
  font-size: 20px;
  margin: 0 8px;
  display: inline-block;
}

@keyframes scroll-text {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-33.333%);
  }
}

@media (max-width: 768px) {
  .banner-text-track {
    font-size: 16px;
  }
}

/* ================================
   LOAD MORE BUTTON
   ================================ */

.load-more-wrapper {
  text-align: center;
  margin: 40px 0;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: rgb(59 130 246);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.btn-load-more:hover {
  background: rgb(29 78 216);
  transform: translateY(-2px);
  box-shadow: 0 8px 12px rgba(59, 130, 246, 0.3);
}

.btn-load-more:disabled {
  background: rgb(148 163 184);
  cursor: not-allowed;
  transform: none;
}

.btn-load-more svg {
  transition: transform 0.3s;
}

.btn-load-more:hover svg {
  transform: translateY(3px);
}

.load-more-status {
  margin-top: 16px;
  font-size: 14px;
  color: rgb(100 116 139);
}

.load-more-status span {
  font-weight: 600;
  color: rgb(59 130 246);
}

/* ================================
   TOAST NOTIFICATIONS
   ================================ */

.shabbat250-toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  pointer-events: none;
}

.shabbat250-toast {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(13.2px);
  -webkit-backdrop-filter: blur(13.2px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  max-width: 400px;
  margin-bottom: 12px;
  pointer-events: auto;
  cursor: pointer;
  animation: slideInLeft 0.4s ease-out;
  transition: all 0.3s;
}

.shabbat250-toast:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2);
}

.shabbat250-toast.toast-exit {
  animation: slideOutLeft 0.3s ease-in forwards;
}

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #b50000;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-name {
  font-weight: 600;
  color: rgb(255, 255, 255);
  margin: 0 0 4px 0;
  font-size: 15px;
}

.toast-message {
  font-size: 13px;
  color: rgb(187, 187, 187);
  margin: 0;
}

.toast-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(241, 245, 249, 0.625);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(100 116 139);
  transition: all 0.2s;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgb(226 232 240);
  color: rgb(15 23 42);
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-100%);
  }
}

@media (max-width: 640px) {
  .shabbat250-toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  .shabbat250-toast {
    min-width: auto;
    max-width: 100%;
  }
}

/* Map Container */
#shabbat250-map {
  border: 2px solid #e2e8f0;
}

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-popup-tip {
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.1) !important;
}

/* Map controls */
.leaflet-control-zoom {
  border: none !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-control-zoom a {
  color: #1e40af !important;
  font-weight: 600 !important;
}

.leaflet-control-zoom a:hover {
  background: #eff6ff !important;
}
