/* Padel Dashboard - Calendar View Styles */

/* Base */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

/* Sidebar */
aside {
  overflow-y: auto;
}

/* Calendar grid lines */
#timeline {
  background-color: #f5f5f5;
}

/* Hide slots until JS filters are applied (prevents flash) */
#slots-container {
  opacity: 0;
  transition: opacity 0.15s ease;
}

#slots-container.ready {
  opacity: 1;
}

/* Slot blocks */
.slot-block {
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.slot-block:hover {
  opacity: 0.9;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.slot-block.hidden {
  display: none !important;
}

/* Duration pills */
.duration-pill {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 500;
}

/* Display modes - Full vs Compact */
.slot-block {
  height: 54px; /* Default full mode height */
}

.slot-full {
  display: flex;
}

.slot-compact {
  display: none;
}

/* Compact mode (toggled via JS when >6 clubs selected) */
#slots-container.compact-mode .slot-block {
  height: 36px;
}

#slots-container.compact-mode .slot-full {
  display: none;
}

#slots-container.compact-mode .slot-compact {
  display: flex;
}

/* Checkbox styling */
.club-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
}

/* Scrollbar styling */
#calendar-container::-webkit-scrollbar,
#club-filters::-webkit-scrollbar {
  width: 8px;
}

#calendar-container::-webkit-scrollbar-track,
#club-filters::-webkit-scrollbar-track {
  background: #f1f1f1;
}

#calendar-container::-webkit-scrollbar-thumb,
#club-filters::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

#calendar-container::-webkit-scrollbar-thumb:hover,
#club-filters::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Time label positioning */
.time-label {
  font-variant-numeric: tabular-nums;
}

/* Current time line animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.current-time-line {
  animation: pulse 2s ease-in-out infinite;
}

/* Filter label hover */
#club-filters label:hover {
  background-color: #f9fafb;
}

/* Navigation buttons */
header a {
  transition: background-color 0.15s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .flex.h-screen {
    overflow-x: hidden;
  }

  aside {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  aside.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }

  #sidebar-overlay.open {
    display: block;
  }

  main {
    margin-left: 0 !important;
  }
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Feedback Button */
#feedback-btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#feedback-btn:hover {
  transform: scale(1.05);
  background-color: #159980 !important;
  box-shadow: 0 4px 20px rgba(26, 180, 153, 0.4);
}

/* Feedback Submit Button */
#feedback-submit-btn:hover {
  background-color: #159980 !important;
}

#feedback-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#feedback-submit-btn.loading {
  position: relative;
  color: transparent;
}

#feedback-submit-btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
