/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  min-width: 200px;
}

.loading-message {
  margin-top: 1rem;
  color: #333;
  font-weight: 500;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  top: 24px;
  right: 24px;
  padding: 20px 24px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 10000;
  min-width: 320px;
  max-width: 500px;
  font-size: 16px;
  font-weight: 500;
  opacity: 0;
  transform: translateX(500px);
  transition: all 0.3s ease-in-out;
}

/* Tour overlay & tooltip (prototype) */
.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 20000;
}
.tour-highlight {
  position: absolute;
  border: 2px solid #ffd54f;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  border-radius: 8px;
  z-index: 20010;
  pointer-events: none;
}
.tour-tooltip {
  position: absolute;
  max-width: 420px;
  background: white;
  padding: 14px;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  z-index: 20020;
}
.tour-tooltip .tour-header { font-weight:700; margin-bottom:6px; }
.tour-tooltip .tour-body { margin-bottom:10px; color:#374151 }
.tour-tooltip .tour-controls { display:flex; gap:8px; justify-content:flex-end }

/* Cancelled event visual */
.event-row.cancelled {
  background-color: #fff0f0;
}
.event-row.cancelled td {
  color: #6b1717;
}
.event-row .badge.cancelled-badge {
  background: #dc3545;
  color: #fff;
}


/* brief pulse for highlighted action buttons */
.tour-highlight-target {
  animation: tourPulse 1s ease-in-out 0s 3;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.15) !important;
}
@keyframes tourPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

.toast-error {
  border-left: 5px solid #dc3545;
  background: #f8d7da;
  color: #721c24;
}

.toast-info {
  border-left: 5px solid #17a2b8;
  background: #d1ecf1;
  color: #0c5460;
}

/* Improved modal max height */
.modal-body {
  max-height: 70vh;
  overflow-y: auto;
}

/* Button loading state */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Confirm Dialog */
.confirm-dialog-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.confirm-dialog {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  overflow: hidden;
  animation: scaleIn 0.3s ease-out;
}

.confirm-dialog-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #e9ecef;
}

.confirm-dialog-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: #212529;
}

.confirm-dialog-body {
  padding: 24px;
  font-size: 16px;
  color: #495057;
  line-height: 1.6;
}

.confirm-dialog-footer {
  padding: 16px 24px;
  background: #f8f9fa;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.confirm-dialog-footer button {
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.confirm-dialog-footer .btn-confirm {
  background: #dc3545;
  color: white;
}

.confirm-dialog-footer .btn-confirm:hover {
  background: #bb2d3b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.confirm-dialog-footer .btn-cancel {
  background: #6c757d;
  color: white;
}

.confirm-dialog-footer .btn-cancel:hover {
  background: #5c636a;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Search highlight */
.search-highlight {
  background-color: #fff3cd;
  padding: 2px 4px;
  border-radius: 3px;
}

/* Keyboard shortcut hints */
.keyboard-hint {
  font-size: 0.75rem;
  color: #6c757d;
  margin-left: 0.5rem;
}

.kbd {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
  font-family: monospace;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.1);
}

/* Team card & meta layout polish (scoped to iframe) */
.iframe-root .team-card {
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.04);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.iframe-root .team-card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(17,24,39,0.08); }
.iframe-root .team-meta {
  min-width: 180px;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}
.iframe-root .team-meta .meta-top { gap: 0.5rem; }
.iframe-root .team-meta .price-badge {
  background: #0d6efd;
  color: #fff;
  border: none;
  padding: 0.35rem 0.7rem;
  border-radius: 0.6rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(13,110,253,0.08);
}
.iframe-root .team-meta .badge.bg-secondary {
  background: #effaf1;
  color: #14532d;
  border: 1px solid #d6f2dd;
  padding: 0.35rem 0.6rem;
  border-radius: 0.6rem;
  font-weight: 600;
}

/* Modal alignment tweaks (scoped) */
.iframe-root .team-details .row.align-items-center { align-items: center; }

/* Responsive: stack meta under content on small screens (scoped) */
@media (max-width: 767px) {
  .iframe-root .team-meta { align-items: flex-start; text-align: left; min-width: auto; margin-top: 0.75rem; }
  .iframe-root .team-meta .meta-top { flex-direction: column; align-items: flex-start; }
}

/* Price & capacity pills (accessible contrast, scoped) */
.iframe-root .price-pill {
  background: #ffffff;
  color: #0f172a;
  padding: 0.28rem 0.65rem;
  border-radius: 0.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-block;
  border: 1px solid #e9ecef;
  box-shadow: none;
}
.iframe-root .capacity-pill {
  background: #f2fbf4;
  color: #0b5132;
  border: 1px solid #cfeadc;
  padding: 0.28rem 0.62rem;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
} 



/* Team details modal visual polish (scoped) */
.iframe-root .team-details {
  font-size: 15.5px;
  line-height: 1.65;
  color: #111827;
  padding: 0.25rem 0;
}
.iframe-root .team-details .section {
  padding: 0.6rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.iframe-root .team-details .section:last-child { border-bottom: none; padding-bottom: 0; }
.iframe-root .team-details .section-title {
  display: block;
  font-weight: 800;
  margin-bottom: 0.4rem;
  font-size: 1.04rem;
  color: #0b1220;
  letter-spacing: 0.2px;
}
.iframe-root .team-details .section-desc {
  font-size: 1rem;
  color: #374151;
  line-height: 1.6;
  margin-top: 0.25rem;
}
.iframe-root .team-details p,
.iframe-root .team-details .mt-2,
.iframe-root .team-details .mt-1 {
  color: #374151;
}
.iframe-root .team-details .capacity-badge {
  display: inline-block;
  background: #f1fdf6;
  color: #14532d;
  border: 1px solid #c7eed1;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  font-weight: 600;
}
.iframe-root .team-details .price-badge {
  display: inline-block;
  background: #fff;
  color: #0f172a;
  border: 1px solid #e9ecef;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  font-weight: 700;
}

/* Non-scoped fallbacks (same rules) */
.team-details {
  /* Current season badge and subtitle layout (fallbacks further below) will ensure the season badge displays on all pages */
}

/* Current season badge and subtitle layout */
.iframe-root #clubSubtitle { display:flex; align-items:center; gap:0.6rem; flex-wrap:wrap; }
.iframe-root .current-season-badge {
  display:inline-block;
  background: #e7f0ff;
  color: #0b5bd0;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #cfe0ff;
  font-weight: 700;
  font-size: 0.95rem;
}
/* Non-scoped fallback */
#clubSubtitle { display:flex; align-items:center; gap:0.6rem; flex-wrap:wrap; }
.current-season-badge {
  display:inline-block;
  background: #e7f0ff;
  color: #0b5bd0;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #cfe0ff;
  font-weight: 700;
  font-size: 0.95rem;
}

.team-details {
  font-size: 15.5px;
  line-height: 1.65;
  color: #111827;
  padding: 0.25rem 0;
}
.team-details .section {
  padding: 0.6rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.team-details .section:last-child { border-bottom: none; padding-bottom: 0; }
.team-details .section-title {
  display: block;
  font-weight: 800;
  margin-bottom: 0.4rem;
  font-size: 1.04rem;
  color: #0b1220;
  letter-spacing: 0.2px;
}
.team-details .section-desc {
  font-size: 1rem;
  color: #374151;
  line-height: 1.6;
  margin-top: 0.25rem;
}
.iframe-root .modal-footer #teamDetailsJoinBtn {
  min-width: 120px;
  padding: 0.375rem 0.75rem;
  font-size: 0.95rem;
  border-radius: 6px;
  box-shadow: none;
  display: inline-block;
  vertical-align: middle;
  line-height: 1.1;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.iframe-root .modal-footer #teamDetailsJoinBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
/* (CTA toned down for embedded contexts) */
.iframe-root .modal-body .text-muted.small {
  margin-top: 10px;
  opacity: 0.95;
  color: #6b7280;
  font-style: italic;
} 

/* Non-scoped fallbacks so the page looks correct when embedded without .iframe-root */
.team-details {
  font-size: 15px;
  line-height: 1.55;
  color: #111827;
}
.team-details .section-title {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.98rem;
  color: #0f172a;
}
.team-details p,
.team-details .mt-2,
.team-details .mt-1 {
  color: #374151;
}
.team-details .capacity-badge {
  display: inline-block;
  background: #f1fdf6;
  color: #14532d;
  border: 1px solid #c7eed1;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  font-weight: 600;
}
.team-details .price-badge {
  display: inline-block;
  background: #fff;
  color: #0f172a;
  border: 1px solid #e9ecef;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  font-weight: 700;
}
.modal-footer #teamDetailsJoinBtn {
  min-width: 120px;
  padding: 0.375rem 0.75rem;
  font-size: 0.95rem;
  border-radius: 6px;
  box-shadow: none;
  display: inline-block;
  vertical-align: middle;
  line-height: 1.1;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.modal-footer #teamDetailsJoinBtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.modal-body .text-muted.small {
  margin-top: 10px;
  opacity: 0.95;
  color: #6b7280;
  font-style: italic;
} 

/* Team details modal header/footer tweaks (scoped) */
.iframe-root #teamDetailsModal .modal-title {
  font-weight: 700;
  font-size: 1.25rem;
}
.iframe-root #teamDetailsModal .modal-body {
  padding-bottom: 0.75rem;
}
.iframe-root #teamDetailsModal .modal-footer {
  border-top: 1px solid #e9ecef;
  padding-top: 16px;
}

/* Ensure modal and backdrop appear above host site if embedded */
.iframe-root .modal {
  z-index: 2147483647 !important;
}
.iframe-root .modal-backdrop {
  z-index: 2147483646 !important;
}

/* Additional modal polishing: card-like body, spacing, and subtle entrance */
.iframe-root #teamDetailsModal .modal-content {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(15,23,42,0.12);
  border: 1px solid rgba(0,0,0,0.04);
}
.iframe-root #teamDetailsModal .modal-body {
  padding: 1.75rem 1.75rem 1rem;
}
.iframe-root .team-details { color: #111827; }
.iframe-root .team-details .mb-3 { margin-bottom: 1.25rem; }
.iframe-root .team-details .mt-3.small { color: #6b7280; margin-top: 1rem; font-style: italic; }

/* Non-scoped fallback */
.team-details { color: #111827; }
.team-details .mb-3 { margin-bottom: 1.25rem; }
.team-details .mt-3.small { color: #6b7280; margin-top: 1rem; font-style: italic; }

/* Soft entrance */
.iframe-root #teamDetailsModal.fade .modal-dialog {
  transform: translateY(-6px);
  transition: transform 0.22s cubic-bezier(.2,.8,.2,1);
}
.iframe-root #teamDetailsModal.show .modal-dialog {
  transform: translateY(0);
}


