/* Golf Tee Times Finder - Sidebar Design */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Material Icons */
.material-icons {
  font-family: "Material Icons";
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  vertical-align: middle;
}

:root {
  --primary-color: #1b5e20;
  --secondary-color: #4caf50;
  --accent-color: #81c784;
  --background-color: #f8f9fa;
  --card-background: #ffffff;
  --sidebar-background: #263238;
  --text-primary: #212121;
  --text-secondary: #757575;
  --text-white: #ffffff;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --border-radius: 8px;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
  width: 300px;
  background-color: var(--sidebar-background);
  color: var(--text-white);
  padding: 24px;
  box-shadow: var(--shadow-medium);
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--text-white);
  text-align: center;
}

.filters-section h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-white);
}

.filter-group {
  margin-bottom: 24px;
}

.filter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.9);
}

.filter-label .material-icons {
  font-size: 18px;
  color: var(--accent-color);
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-white);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--accent-color);
  background-color: rgba(255, 255, 255, 0.15);
}

.filter-select option {
  background-color: var(--sidebar-background);
  color: var(--text-white);
}

.provider-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.provider-btn {
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.provider-btn:hover,
.provider-btn.active {
  background: var(--secondary-color);
  color: white;
  border-color: var(--secondary-color);
}

/* Main Content Styles */
.main-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.content-header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.content-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.results-count {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Loading State */
.loading {
  text-align: center;
  padding: 60px 20px;
}

.loading-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-top: 16px;
}

/* Course Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

/* Course Cards */
.course-card {
  background: var(--card-background);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.course-card.no-slots {
  opacity: 0.6;
}

.course-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, #4caf50 0%, #81c784 100%);
  position: relative;
  overflow: hidden;
}

.course-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="golf" patternUnits="userSpaceOnUse" width="20" height="20"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23golf)"/></svg>')
    center/cover;
  opacity: 0.3;
}

.course-image .image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
  padding: 24px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.course-header-content {
  flex: 1;
}

.course-header-content .course-name {
  font-size: 1.3rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.course-header-content .course-location {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 4px;
}

.course-header-content .course-location .material-icons {
  font-size: 16px;
}

.course-info {
  padding: 24px;
}

.provider-badge {
  background: var(--background-color);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.time-slots {
  margin-bottom: 20px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.time-slot {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 12px 8px;
  text-align: center;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  cursor: pointer;
  color: var(--text-primary);
}

.slot-time {
  font-weight: 600;
  margin-bottom: 2px;
}

.slot-players {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.slot-players .material-icons {
  font-size: 12px;
}

.time-slot .price {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.no-slots-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--background-color);
  border-radius: var(--border-radius);
  margin: 12px 0;
}

.course-links {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.course-link {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

/* Loading States */
.loading-state {
  opacity: 0.7;
}

.loading-skeleton {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--background-color);
  border-radius: var(--border-radius);
  margin: 12px 0;
}

.skeleton-loader {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top: 2px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error State */
.error {
  text-align: center;
  padding: 60px 20px;
}

.error-message {
  background: var(--card-background);
  border: 1px solid #f5c6cb;
  border-radius: var(--border-radius);
  padding: 32px;
  max-width: 500px;
  margin: 0 auto;
  color: #721c24;
}

.error-message h3 {
  margin-bottom: 12px;
  font-weight: 600;
}

/* Utility Classes */
.hidden {
  display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    width: 250px;
  }

  .courses-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

@media (max-width: 768px) {
  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    padding: 16px;
  }

  .main-content {
    padding: 16px;
  }

  .courses-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .course-links {
    flex-direction: column;
  }

  .slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
}

@media (max-width: 480px) {
  .content-header h2 {
    font-size: 1.2rem;
  }

  .course-info {
    padding: 16px;
  }
}
