/* FullCalendar Custom Styles */
#ltcpraha-calendar {
  max-width: 100%;
  margin: 20px auto;
  font-family: "Work Sans", sans-serif;
}

/* Popup Modal Styles */
.event-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.event-popup.show {
  opacity: 1;
  visibility: visible;
}

.event-popup-content {
  background: white;
  border-radius: 4px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.event-popup.show .event-popup-content {
  transform: scale(1);
}

.event-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.event-popup-title {
  font-size: 1.5em;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.event-popup-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 5px;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.event-popup-close:hover {
  background: #f0f0f0;
  color: #333;
}

.event-popup-body {
  margin-bottom: 20px;
}

.event-popup-item {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
}

.event-popup-label {
  font-weight: 600;
  color: #555;
  min-width: 80px;
  margin-right: 10px;
}

.event-popup-value {
  color: #333;
  flex: 1;
}

.event-popup-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 500;
}

.event-popup-status.booked {
  background: #dc3545;
  color: white;
}

.event-popup-status.available {
  background: #28a745;
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  #ltcpraha-calendar {
    margin: 10px;
    font-size: 0.9em;
  }

  /* Mobile popup styles */
  .event-popup-content {
    padding: 20px;
    margin: 10px;
    max-width: 95%;
    width: 95%;
  }

  .event-popup-title {
    font-size: 1.3em;
  }

  .event-popup-item {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 15px;
  }

  .event-popup-label {
    min-width: auto;
    margin-bottom: 5px;
    font-size: 0.9em;
  }

  .event-popup-value {
    font-size: 0.95em;
  }

  .event-popup-status {
    font-size: 0.8em;
    padding: 3px 10px;
  }

  .event-popup-button {
    width: 100%;
    padding: 12px 20px;
    font-size: 1em;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .event-popup-content {
    padding: 15px;
    margin: 5px;
    max-width: 98%;
    width: 98%;
  }

  .event-popup-title {
    font-size: 1.2em;
  }

  .event-popup-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
  }

  .event-popup-close {
    width: 30px;
    height: 30px;
    font-size: 20px;
  }

  .event-popup-item {
    margin-bottom: 12px;
  }

  .event-popup-label {
    font-size: 0.85em;
  }

  .event-popup-value {
    font-size: 0.9em;
  }
}

/* Event Calendar Custom Styles - Modern Design */
.ec-button-group {
  gap: 10px;
}
.ec-header .ec-day {
  line-height: 30px !important;
  min-height: 30px !important;
}
.ec {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background: #ffffff;
}

/* Calendar container styling */
#ltcpraha-calendar,
#ltcpraha-calendar-admin {
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
  /* border: 1px solid #e0e0e0; */
}

/* Modern scrollbar for calendar */
.ec-body::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.ec-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.ec-body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.ec-body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Customize the resource time grid view - Modern Design */
.ec-body .ec-line,
.ec-body .ec-time {
  height: 50px !important;
}

.ec-resource-time-grid .ec-resource {
  border-right: 1px solid #e8e9ea;
  transition: background-color 0.2s ease;
}

.ec-resource-time-grid .ec-resource:hover {
  background-color: #fafbfc;
}

.ec-resource-time-grid .ec-resource-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  font-weight: 600;
  color: #2c3e50;
  padding: 20px 16px;
  border-bottom: 2px solid #e8e9ea;
  min-height: 70px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  position: relative;
}

.ec-resource-time-grid .ec-resource-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #dc3545, #c82333);
}

.ec-resource-time-grid .ec-time-slot {
  border-right: 1px solid #e8e9ea;
  border-bottom: 1px solid #e8e9ea;
  min-height: 50px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
  position: relative;
}

.ec-resource-time-grid .ec-time-slot:hover {
  background-color: #f8f9fa;
}

.ec-resource-time-grid .ec-time-slot-label {
  font-size: 11px;
  color: #6c757d;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Event styling - Modern and Elegant */
.ec-events {
  margin: 0 !important;
}

.ec-event {
  border-radius: 0px !important;
  font-size: 14px;
  font-weight: 500;
  border: none !important;
  box-shadow: 0 1px 4px rgba(220, 53, 69, 0.2);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
  background: rgba(220, 53, 69, 0.8) !important;
  cursor: pointer;
}

.ec-event:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.ec-event .ec-event-body {
  padding: 2px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  justify-content: center;
}

.ec-event .ec-event-time {
  font-size: 16px;
  font-weight: 600;
  opacity: 0.9;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0;
  line-height: 20px;
}

.ec-event .ec-event-title {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  margin: 0;
  color: #fff;
}

/* Add subtle gradient overlay for depth */
.ec-event::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 100%
  );
  pointer-events: none;
}

/* Add subtle animation for loading state */
.ec-event.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Resource labels */
.ec-resource-time-grid .ec-resource-title {
  font-weight: 600;
  color: #333;
}

/* Time grid styling */
.ec-timegrid .ec-timegrid-slot {
  border-right: 1px solid #e0e0e0;
  min-height: 60px;
  padding: 8px;
}

.ec-timegrid .ec-timegrid-slot-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

/* Hide the time labels row completely */
.ec-timegrid .ec-timegrid-slot-labels {
  display: none !important;
}

.ec-timegrid .ec-timegrid-slot-label {
  display: none !important;
}

/* Hide time labels after court headlines */
.ec-resource-time-grid .ec-timegrid-slot-labels {
  display: none !important;
}

.ec-resource-time-grid .ec-timegrid-slot-label {
  display: none !important;
}

/* Hide any time column headers */
.ec-timegrid .ec-timegrid-slot-labels,
.ec-timegrid .ec-timegrid-slot-label,
.ec-resource-time-grid .ec-timegrid-slot-labels,
.ec-resource-time-grid .ec-timegrid-slot-label {
  display: none !important;
}

/* Hide the sidebar time column completely */
.ec-timegrid .ec-timegrid-slot-labels,
.ec-timegrid .ec-timegrid-slot-label,
.ec-timegrid .ec-timegrid-slot-labels .ec-timegrid-slot-label,
.ec-resource-time-grid .ec-timegrid-slot-labels,
.ec-resource-time-grid .ec-timegrid-slot-label {
  display: none !important;
}

/* Hide the entire time column sidebar */
.ec-timegrid .ec-timegrid-slot-labels,
.ec-timegrid .ec-timegrid-slot-label,
.ec-timegrid .ec-timegrid-slot-labels .ec-timegrid-slot-label,
.ec-timegrid .ec-timegrid-slot-labels .ec-timegrid-slot-label,
.ec-resource-time-grid .ec-timegrid-slot-labels,
.ec-resource-time-grid .ec-timegrid-slot-label {
  display: none !important;
}

/* Custom Resource Calendar Styles */
.custom-resource-calendar {
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: white;
  border-bottom: 1px solid #ddd;
}

.calendar-navigation {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.nav-btn:hover {
  background: #c82333;
}

.nav-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.6;
}

.current-date {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.calendar-views {
  display: flex;
  gap: 8px;
}

.view-btn {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.view-btn:hover {
  background: #f8f9fa;
  border-color: #007bff;
  color: #007bff;
}

.view-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.resource-grid {
  display: flex;
  flex-direction: column;
}

.resource-grid-header {
  display: flex;
  background: white;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 10;
}

.resource-label {
  width: 120px;
  padding: 12px 16px;
  font-weight: 600;
  color: #333;
  border-right: 1px solid #ddd;
  display: flex;
  align-items: center;
  background: #fafafa;
}

.time-slots {
  display: flex;
  flex: 1;
  overflow-x: auto;
}

.time-slot {
  flex: 1;
  min-width: 60px;
  padding: 12px 8px;
  text-align: center;
  font-weight: 500;
  color: #666;
  border-right: 1px solid #ddd;
  font-size: 12px;
  background: #fafafa;
}

.resource-rows {
  display: flex;
  flex-direction: column;
}

.resource-row {
  display: flex;
  border-bottom: 1px solid #ddd;
  min-height: 50px;
  background: white;
}

.resource-row:hover {
  background: #f8f9fa;
}

.court-name {
  width: 120px;
  padding: 12px 16px;
  font-weight: 500;
  color: #333;
  border-right: 1px solid #ddd;
  display: flex;
  align-items: center;
  background: white;
}

.time-slots-row {
  display: flex;
  flex: 1;
  overflow-x: auto;
}

.time-slot-cell {
  flex: 1;
  min-width: 60px;
  height: 50px;
  border-right: 1px solid #ddd;
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
  background: white;
}

.time-slot-cell.available {
  background: #e8f5e8;
}

.time-slot-cell.available:hover {
  background: #d4edda;
}

.time-slot-cell.booked {
  background: #f8d7da;
  cursor: not-allowed;
}

.time-slot-cell.booked:hover {
  background: #f5c6cb;
}

/* Responsive design */
@media (max-width: 768px) {
  .calendar-header {
    flex-direction: column;
    gap: 12px;
    padding: 12px;
  }

  .calendar-navigation {
    order: 2;
  }

  .calendar-views {
    order: 1;
  }

  .resource-label,
  .court-name {
    width: 80px;
    font-size: 12px;
    padding: 8px 12px;
  }

  .time-slot,
  .time-slot-cell {
    min-width: 50px;
  }

  .time-slot {
    font-size: 10px;
    padding: 8px 4px;
  }

  .ec-resource-time-grid .ec-resource-header {
    padding: 8px 12px;
    font-size: 12px;
  }

  .ec-resource-time-grid .ec-time-slot-label {
    font-size: 10px;
  }

  .ec-event {
    font-size: 10px;
  }
}

/* Calendar Loader */
.loader {
  width: 85px;
  height: 50px;
  --g1: conic-gradient(
    from 90deg at left 3px top 3px,
    #0000 90deg,
    rgba(198, 29, 35, 100) 0
  );
  --g2: conic-gradient(
    from -90deg at bottom 3px right 3px,
    #0000 90deg,
    rgba(198, 29, 35, 100) 0
  );
  background: var(--g1), var(--g1), var(--g1), var(--g2), var(--g2), var(--g2);
  background-position: left, center, right;
  background-repeat: no-repeat;
  animation: l9 1s infinite;
}
@keyframes l9 {
  0% {
    background-size: 25px 50%, 25px 50%, 25px 50%;
  }
  25% {
    background-size: 25px 100%, 25px 50%, 25px 50%;
  }
  50% {
    background-size: 25px 50%, 25px 100%, 25px 50%;
  }
  75% {
    background-size: 25px 50%, 25px 50%, 25px 100%;
  }
  100% {
    background-size: 25px 50%, 25px 50%, 25px 50%;
  }
}
