/* EQUIPE Public Calendar Styles */
.equipe-calendar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Prevent body scroll when modal is open */
body.equipe-modal-open {
  overflow: hidden !important;
}

.equipe-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.equipe-calendar-title {
  font-size: 28px;
  font-weight: 700;
  color: #000;
  margin: 0;
}

h3.equipe-calendar-modal-title {
    letter-spacing:0 !important;
}

.equipe-calendar-year-selector {
  display: flex;
  align-items: center;
  gap: 15px;
}

.equipe-calendar-year-btn {
  background: #831d81;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s;
}

.equipe-calendar-year-btn:hover {
  background: #6a1768;
}

.equipe-calendar-year-display {
  font-size: 24px;
  font-weight: 600;
  color: #831d81;
  min-width: 80px;
  text-align: center;
}

.equipe-calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.equipe-calendar-month {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.equipe-calendar-month-header {
  background: #831d81;
  color: white;
  padding: 12px;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
}

.equipe-calendar-events {
  padding: 12px;
  min-height: 120px;
}

.equipe-calendar-event {
  padding: 8px 10px;
  margin-bottom: 8px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.4;
  border-left: 3px solid;
  background: #f5f5f5;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
}

.equipe-calendar-event:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.equipe-calendar-event.race {
  border-left-color: #831d81;
  background: #f5e6f5;
}

.equipe-calendar-event.training {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.equipe-calendar-event.camp {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.equipe-calendar-event.other {
  border-left-color: #d97706;
  background: #fffbeb;
}

.equipe-calendar-event-date {
  font-weight: 600;
  color: #000;
  margin-bottom: 2px;
}

.equipe-calendar-event-title {
  color: #333;
  font-weight: 500;
}

.equipe-calendar-event-location {
  color: #666;
  font-size: 12px;
  margin-top: 2px;
}

.equipe-calendar-no-events {
  color: #999;
  font-style: italic;
  padding: 20px;
  text-align: center;
}

.equipe-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
}

.equipe-calendar-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.equipe-calendar-legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 2px;
}

.equipe-calendar-loading {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 16px;
}

.equipe-calendar-error {
  text-align: center;
  padding: 40px 20px;
  color: #dc2626;
  font-size: 16px;
  background: #fee2e2;
  border-radius: 8px;
}

/* Modal Styles - Absolute Positioning mit JS Scroll */
.equipe-calendar-modal {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.6) !important;
  z-index: 999999 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.equipe-calendar-modal.open {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 20px !important;
}

.equipe-calendar-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  margin: auto;
}

.equipe-calendar-modal-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.equipe-calendar-modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #000;
  margin: 0;
  flex: 1;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
}

.equipe-calendar-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.equipe-calendar-modal-close:hover {
  background: #f0f0f0;
}

.equipe-calendar-modal-body {
  padding: 20px;
}

.equipe-calendar-modal-field {
  margin-bottom: 16px;
}

.equipe-calendar-modal-label {
  font-weight: 600;
  color: #666;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.equipe-calendar-modal-value {
  color: #000;
  font-size: 15px;
  line-height: 1.6;
}

.equipe-calendar-modal-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: white;
}

.equipe-calendar-modal-badge.race {
  background: #831d81;
}

.equipe-calendar-modal-badge.training {
  background: #2563eb;
}

.equipe-calendar-modal-badge.camp {
  background: #16a34a;
}

.equipe-calendar-modal-badge.other {
  background: #d97706;
}

@media (max-width: 768px) {
  .equipe-calendar-grid {
    grid-template-columns: 1fr;
  }

  .equipe-calendar-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .equipe-calendar-legend {
    flex-direction: column;
    gap: 12px;
  }
}
