/**
 * GWP Modern Timetable - Responsive Styles
 * Mobile-first responsive design with modern CSS features
 */

:root {
  /* Color Palette */
  --gwp-primary: #2563eb;
  --gwp-primary-hover: #1d4ed8;
  --gwp-secondary: #64748b;
  --gwp-success: #059669;
  --gwp-warning: #d97706;
  --gwp-error: #dc2626;
  
  /* Background Colors */
  --gwp-bg-primary: #ffffff;
  --gwp-bg-secondary: #f8fafc;
  --gwp-bg-card: #ffffff;
  --gwp-bg-skeleton: #e2e8f0;
  
  /* Text Colors */
  --gwp-text-primary: #1e293b;
  --gwp-text-secondary: #64748b;
  --gwp-text-muted: #94a3b8;
  
  /* Border Colors */
  --gwp-border-light: #e2e8f0;
  --gwp-border-medium: #cbd5e1;
  --gwp-border-dark: #94a3b8;
  
  /* Shadows */
  --gwp-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --gwp-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --gwp-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Spacing */
  --gwp-space-xs: 0.25rem;
  --gwp-space-sm: 0.5rem;
  --gwp-space-md: 1rem;
  --gwp-space-lg: 1.5rem;
  --gwp-space-xl: 2rem;
  --gwp-space-2xl: 3rem;
  
  /* Border Radius */
  --gwp-radius-sm: 0.25rem;
  --gwp-radius-md: 0.5rem;
  --gwp-radius-lg: 0.75rem;
  --gwp-radius-xl: 1rem;
  
  /* Typography */
  --gwp-font-size-xs: 0.75rem;
  --gwp-font-size-sm: 0.875rem;
  --gwp-font-size-base: 1rem;
  --gwp-font-size-lg: 1.125rem;
  --gwp-font-size-xl: 1.25rem;
  --gwp-font-size-2xl: 1.5rem;
  
  /* Transitions */
  --gwp-transition: all 0.15s ease-in-out;
  --gwp-transition-slow: all 0.3s ease-in-out;
}


/* Base Styles */
.gwp-modern-timetable {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--gwp-bg-primary);
  color: var(--gwp-text-primary);
  line-height: 1.6;
  transition: var(--gwp-transition);
}

.gwp-modern-timetable * {
  box-sizing: border-box;
}

/* Loading & Skeleton States */
.gwp-mt-loading {
  padding: var(--gwp-space-lg);
}

.gwp-mt-skeleton {
  display: grid;
  gap: var(--gwp-space-md);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.gwp-mt-skeleton-card {
  background: var(--gwp-bg-card);
  border-radius: var(--gwp-radius-lg);
  padding: var(--gwp-space-lg);
  border: 1px solid var(--gwp-border-light);
}

.gwp-mt-skeleton-line {
  height: 1rem;
  background: linear-gradient(90deg, var(--gwp-bg-skeleton) 25%, transparent 50%, var(--gwp-bg-skeleton) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--gwp-radius-sm);
  margin-bottom: var(--gwp-space-sm);
}

.gwp-mt-skeleton-line.short {
  width: 60%;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Filters Section */
.gwp-mt-filters {
  background: var(--gwp-bg-secondary);
  border-radius: var(--gwp-radius-lg);
  padding: var(--gwp-space-lg);
  margin-bottom: var(--gwp-space-xl);
  border: 1px solid var(--gwp-border-light);
  transition: var(--gwp-transition);
}

/* Hide mobile header on desktop */
.gwp-mt-mobile-filter-header {
  display: none;
}

/* Show filter body by default on desktop */
.gwp-mt-mobile-filter-body {
  display: block;
}

/* Mobile Filter System */
@media (max-width: 768px) {
  .gwp-mt-filters {
    position: sticky;
    top: 10px;
    z-index: 1000;
    margin-bottom: var(--gwp-space-md);
    padding: var(--gwp-space-sm);
    background: var(--gwp-bg-primary);
    border: 2px solid var(--gwp-primary);
    box-shadow: var(--gwp-shadow-lg);
    border-radius: var(--gwp-radius-xl);
  }
  
  /* Show mobile header on mobile */
  .gwp-mt-mobile-filter-header {
    display: flex;
  }
  
  .gwp-mt-filters.collapsed {
    padding: var(--gwp-space-xs) var(--gwp-space-sm);
  }
  
  .gwp-mt-mobile-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--gwp-space-sm);
  }
  
  .gwp-mt-mobile-filter-toggle {
    display: flex;
    align-items: center;
    gap: var(--gwp-space-xs);
    background: var(--gwp-primary);
    color: white;
    border: none;
    border-radius: var(--gwp-radius-lg);
    padding: var(--gwp-space-xs) var(--gwp-space-sm);
    font-size: var(--gwp-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--gwp-transition);
    min-width: 90px;
  }
  
  .gwp-mt-mobile-filter-toggle:hover {
    background: var(--gwp-primary-hover);
    transform: translateY(-1px);
  }
  
  .gwp-mt-mobile-filter-toggle:active {
    transform: translateY(0);
  }
  
  .gwp-mt-filter-icon {
    font-size: var(--gwp-font-size-base);
    transition: transform 0.3s ease;
  }
  
  .gwp-mt-filters.expanded .gwp-mt-filter-icon {
    transform: rotate(180deg);
  }
  
  .gwp-mt-mobile-filter-status {
    font-size: var(--gwp-font-size-xs);
    color: var(--gwp-text-muted);
    background: var(--gwp-bg-secondary);
    padding: 2px 6px;
    border-radius: var(--gwp-radius-sm);
    min-width: 60px;
    text-align: center;
  }
  
  .gwp-mt-mobile-filter-status.active {
    background: var(--gwp-primary);
    color: white;
  }
  
  .gwp-mt-mobile-filter-body {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
  }
  
  .gwp-mt-filters.expanded .gwp-mt-mobile-filter-body {
    max-height: 500px;
    opacity: 1;
  }
  
  .gwp-mt-search-wrapper {
    margin-bottom: var(--gwp-space-sm);
  }
  
  .gwp-mt-search {
    font-size: var(--gwp-font-size-sm);
    padding: var(--gwp-space-sm);
  }
  
  .gwp-mt-filter-row {
    flex-direction: column;
    gap: var(--gwp-space-sm);
  }
  
  .gwp-mt-filter {
    width: 100%;
    min-width: unset;
    font-size: var(--gwp-font-size-sm);
    padding: var(--gwp-space-sm);
  }
  
  .gwp-mt-clear-filters {
    width: 100%;
    padding: var(--gwp-space-sm);
    font-size: var(--gwp-font-size-sm);
    margin-top: var(--gwp-space-xs);
  }
  
  /* Hide desktop elements on mobile */
  .gwp-mt-filters:not(.expanded) .gwp-mt-search-wrapper,
  .gwp-mt-filters:not(.expanded) .gwp-mt-filter-row {
    display: none;
  }
}

.gwp-mt-search-wrapper {
  position: relative;
  margin-bottom: var(--gwp-space-md);
}

.gwp-mt-search {
  width: 100%;
  padding: var(--gwp-space-md) var(--gwp-space-md) var(--gwp-space-md) 2.5rem;
  border: 2px solid var(--gwp-border-medium);
  border-radius: var(--gwp-radius-md);
  background: var(--gwp-bg-primary);
  color: var(--gwp-text-primary);
  font-size: var(--gwp-font-size-base);
  transition: var(--gwp-transition);
}

.gwp-mt-search:focus {
  outline: none;
  border-color: var(--gwp-primary);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.gwp-mt-search-icon {
  position: absolute;
  left: var(--gwp-space-md);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--gwp-font-size-lg);
  color: var(--gwp-text-muted);
  pointer-events: none;
}

.gwp-mt-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gwp-space-md);
  align-items: center;
}

.gwp-mt-filter {
  flex: 1;
  min-width: 150px;
  padding: var(--gwp-space-md);
  border: 2px solid var(--gwp-border-medium);
  border-radius: var(--gwp-radius-md);
  background: var(--gwp-bg-primary);
  color: var(--gwp-text-primary);
  font-size: var(--gwp-font-size-sm);
  transition: var(--gwp-transition);
}

.gwp-mt-filter:focus {
  outline: none;
  border-color: var(--gwp-primary);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.gwp-mt-clear-filters {
  padding: var(--gwp-space-md) var(--gwp-space-lg);
  background: var(--gwp-secondary);
  color: white;
  border: none;
  border-radius: var(--gwp-radius-md);
  font-size: var(--gwp-font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: var(--gwp-transition);
  white-space: nowrap;
}

.gwp-mt-clear-filters:hover {
  background: var(--gwp-text-secondary);
  transform: translateY(-1px);
}

.gwp-mt-clear-filters:active {
  transform: translateY(0);
}

/* Results Info */
.gwp-mt-results-info {
  margin-bottom: var(--gwp-space-lg);
  color: var(--gwp-text-secondary);
  font-size: var(--gwp-font-size-sm);
}

.gwp-mt-count {
  font-weight: 600;
  color: var(--gwp-primary);
}

/* View More Button */
.gwp-mt-view-more-container {
  text-align: center;
  margin: var(--gwp-space-xl) 0;
  padding: var(--gwp-space-lg) 0;
  border-top: 1px dashed var(--gwp-border-medium);
}

.gwp-mt-view-more {
  background: linear-gradient(135deg, var(--gwp-primary), var(--gwp-secondary));
  color: white;
  border: none;
  border-radius: var(--gwp-radius-lg);
  padding: var(--gwp-space-md) var(--gwp-space-xl);
  font-size: var(--gwp-font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: var(--gwp-transition);
  box-shadow: var(--gwp-shadow-md);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gwp-space-xs);
}

.gwp-mt-view-more:hover {
  transform: translateY(-2px);
  box-shadow: var(--gwp-shadow-lg);
  background: linear-gradient(135deg, var(--gwp-primary-hover), var(--gwp-text-secondary));
}

.gwp-mt-view-more:active {
  transform: translateY(0);
}

.gwp-mt-view-more-text {
  font-size: var(--gwp-font-size-base);
  font-weight: 600;
}

.gwp-mt-hidden-indicator {
  font-size: var(--gwp-font-size-sm);
  opacity: 0.9;
  font-weight: 400;
}

/* Cards Layout */
.gwp-mt-cards-container {
  display: flex;
  flex-direction: column;
  gap: var(--gwp-space-2xl);
}

.gwp-mt-day-group {
  position: relative;
}

.gwp-mt-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--gwp-space-lg);
  padding: var(--gwp-space-md) var(--gwp-space-lg);
  background: linear-gradient(135deg, var(--gwp-primary), var(--gwp-secondary));
  color: white;
  border-radius: var(--gwp-radius-lg);
  box-shadow: var(--gwp-shadow-md);
}

.gwp-mt-day-header-actions {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 120px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.gwp-mt-day-count,
.gwp-mt-day-view-all {
  position: absolute;
  right: 0;
  transition: opacity 0.2s ease-in-out;
}

.gwp-mt-day-header-actions .gwp-mt-day-count {
  opacity: 1;
}

.gwp-mt-day-header-actions .gwp-mt-day-view-all {
  opacity: 0;
}

.gwp-mt-day-header-actions.gwp-mt-filtered .gwp-mt-day-count {
  opacity: 0;
  pointer-events: none;
}

.gwp-mt-day-header-actions.gwp-mt-filtered .gwp-mt-day-view-all {
  opacity: 1;
  pointer-events: auto;
}

.gwp-mt-day-title {
  margin: 0;
  font-size: var(--gwp-font-size-xl);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.gwp-mt-day-count {
  background: rgba(255, 255, 255, 0.2);
  padding: var(--gwp-space-xs) var(--gwp-space-sm);
  border-radius: var(--gwp-radius-md);
  font-size: var(--gwp-font-size-sm);
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.gwp-mt-day-view-all {
  background: rgba(255, 255, 255, 0.9);
  color: var(--gwp-primary);
  border: none;
  border-radius: var(--gwp-radius-md);
  padding: var(--gwp-space-xs) var(--gwp-space-sm);
  font-size: var(--gwp-font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--gwp-transition);
}

.gwp-mt-day-view-all:hover {
  background: white;
  transform: translateY(-1px);
}

.gwp-mt-cards {
  display: grid;
  gap: var(--gwp-space-lg);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.gwp-mt-layout-cards .gwp-mt-table-wrapper {
  display: none;
}

.gwp-mt-card {
  background: var(--gwp-bg-card);
  border: 1px solid var(--gwp-border-light);
  border-radius: var(--gwp-radius-lg);
  padding: var(--gwp-space-md);
  transition: var(--gwp-transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.gwp-mt-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--gwp-shadow-lg);
  border-color: var(--gwp-primary);
}

.gwp-mt-card:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
  border-color: var(--gwp-primary);
}

.gwp-mt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gwp-primary), var(--gwp-success));
  opacity: 0;
  transition: var(--gwp-transition);
}

.gwp-mt-card:hover::before {
  opacity: 1;
}

.gwp-mt-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--gwp-space-sm);
  gap: var(--gwp-space-sm);
}

.gwp-mt-activity-title {
  font-size: var(--gwp-font-size-lg);
  font-weight: 700;
  color: var(--gwp-text-primary);
  margin: 0;
  line-height: 1.3;
  flex: 1;
}

.gwp-mt-cost {
  background: linear-gradient(135deg, var(--gwp-success), var(--gwp-primary));
  color: white;
  padding: var(--gwp-space-xs) var(--gwp-space-sm);
  border-radius: var(--gwp-radius-md);
  font-weight: 600;
  font-size: var(--gwp-font-size-sm);
  white-space: nowrap;
  flex-shrink: 0;
}

.gwp-mt-location {
  font-size: var(--gwp-font-size-sm);
  color: var(--gwp-text-secondary);
  margin-bottom: var(--gwp-space-sm);
  font-style: italic;
}

.gwp-mt-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--gwp-font-size-sm);
  color: var(--gwp-text-secondary);
  gap: var(--gwp-space-sm);
}

.gwp-mt-ages {
  font-weight: 500;
}

.gwp-mt-time {
  font-weight: 600;
  color: var(--gwp-text-primary);
}

/* Table Layout */
.gwp-mt-layout-table .gwp-mt-cards {
  display: none;
}

.gwp-mt-table-wrapper {
  border-radius: var(--gwp-radius-lg);
  border: 1px solid var(--gwp-border-light);
  background: var(--gwp-bg-card);
  margin-top: var(--gwp-space-md);
  overflow: hidden;
}

.gwp-mt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--gwp-font-size-sm);
}

.gwp-mt-table th {
  background: var(--gwp-bg-secondary);
  padding: var(--gwp-space-md);
  text-align: left;
  font-weight: 600;
  color: var(--gwp-text-secondary);
  border-bottom: 2px solid var(--gwp-border-medium);
}

.gwp-mt-table td {
  padding: var(--gwp-space-md);
  border-bottom: 1px solid var(--gwp-border-light);
  color: var(--gwp-text-primary);
}

.gwp-mt-table tr:hover {
  background: var(--gwp-bg-secondary);
}

.gwp-mt-table tr:last-child td {
  border-bottom: none;
}

/* Day Separators in Table */
.gwp-mt-day-separator {
  background: transparent !important;
}

.gwp-mt-day-separator-cell {
  padding: var(--gwp-space-lg) var(--gwp-space-md) !important;
  border: none !important;
  background: linear-gradient(135deg, var(--gwp-primary), var(--gwp-secondary));
}

.gwp-mt-day-separator-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.gwp-mt-day-separator-actions {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 120px;
  justify-content: flex-end;
}

.gwp-mt-day-separator-count,
.gwp-mt-separator-view-all {
  position: absolute;
  right: 0;
  transition: opacity 0.2s ease-in-out;
}

.gwp-mt-day-separator-actions .gwp-mt-day-separator-count {
  opacity: 1;
}

.gwp-mt-day-separator-actions .gwp-mt-separator-view-all {
  opacity: 0;
}

.gwp-mt-day-separator-actions.gwp-mt-filtered .gwp-mt-day-separator-count {
  opacity: 0;
  pointer-events: none;
}

.gwp-mt-day-separator-actions.gwp-mt-filtered .gwp-mt-separator-view-all {
  opacity: 1;
  pointer-events: auto;
}

.gwp-mt-day-separator-title {
  font-size: var(--gwp-font-size-lg);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.gwp-mt-day-separator-count {
  background: rgba(255, 255, 255, 0.2);
  padding: var(--gwp-space-xs) var(--gwp-space-sm);
  border-radius: var(--gwp-radius-md);
  font-size: var(--gwp-font-size-sm);
  font-weight: 600;
  backdrop-filter: blur(10px);
}

.gwp-mt-separator-view-all {
  background: rgba(255, 255, 255, 0.9);
  color: var(--gwp-primary);
  border: none;
  border-radius: var(--gwp-radius-md);
  padding: var(--gwp-space-xs) var(--gwp-space-sm);
  font-size: var(--gwp-font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--gwp-transition);
}

.gwp-mt-separator-view-all:hover {
  background: white;
  transform: translateY(-1px);
}

.gwp-mt-activity-row {
  border-left: 3px solid transparent;
  transition: var(--gwp-transition);
}

.gwp-mt-activity-row:hover {
  border-left-color: var(--gwp-primary);
  background: var(--gwp-bg-secondary) !important;
}

.gwp-mt-date-cell {
  font-weight: 600;
  color: var(--gwp-text-secondary);
}

/* Responsive Table - Mobile First Approach */
@media (max-width: 768px) {
  .gwp-mt-table-wrapper {
    border: none;
    background: transparent;
  }
  
  .gwp-mt-table {
    border: 0;
  }
  
  .gwp-mt-table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  
  .gwp-mt-table tr {
    background: var(--gwp-bg-card);
    border: 1px solid var(--gwp-border-light);
    border-radius: var(--gwp-radius-md);
    display: block;
    margin-bottom: var(--gwp-space-sm);
    padding: var(--gwp-space-sm);
    box-shadow: var(--gwp-shadow-sm);
    transition: var(--gwp-transition);
  }
  
  .gwp-mt-table tr:hover {
    box-shadow: var(--gwp-shadow-md);
    transform: translateY(-1px);
    background: var(--gwp-bg-card);
  }
  
  .gwp-mt-table td {
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    text-align: right;
    font-size: 14px;
    line-height: 1.3;
  }
  
  .gwp-mt-table td:last-child {
    border-bottom: none;
  }
  
  .gwp-mt-table td:before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--gwp-text-secondary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.02em;
    flex: 1;
    text-align: left;
  }
  
  /* Hide the date column on mobile since it's redundant with day headers */
  .gwp-mt-table td:first-child {
    display: none;
  }
  
  /* Day separators on mobile */
  .gwp-mt-day-separator {
    display: block !important;
    background: transparent !important;
    border: none !important;
    margin-bottom: var(--gwp-space-xs) !important;
    padding: 0 !important;
  }
  
  .gwp-mt-day-separator-cell {
    display: block !important;
    background: linear-gradient(135deg, var(--gwp-primary), var(--gwp-secondary)) !important;
    color: white !important;
    border-radius: var(--gwp-radius-md) !important;
    padding: var(--gwp-space-sm) var(--gwp-space-md) !important;
    text-align: center !important;
    box-shadow: var(--gwp-shadow-md) !important;
    margin-bottom: var(--gwp-space-sm) !important;
  }
  
  .gwp-mt-day-separator-content {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: var(--gwp-space-xs) !important;
  }
  
  .gwp-mt-day-separator-title {
    font-size: var(--gwp-font-size-sm) !important;
    flex: 1;
    text-align: left !important;
  }
  
  .gwp-mt-day-separator-actions {
    flex-shrink: 0 !important;
  }
}

/* Enhanced mobile table styling */
@media (max-width: 640px) {
  .gwp-mt-table tr {
    padding: var(--gwp-space-sm);
    margin-bottom: var(--gwp-space-sm);
  }
  
  .gwp-mt-table td {
    padding: 3px 0;
    font-size: 14px;
    line-height: 1.3;
  }
  
  .gwp-mt-table td:before {
    font-size: 11px;
  }
}

/* Empty State */
.gwp-mt-empty {
  text-align: center;
  padding: var(--gwp-space-2xl);
  color: var(--gwp-text-secondary);
}

.gwp-mt-empty-icon {
  font-size: 4rem;
  margin-bottom: var(--gwp-space-lg);
  opacity: 0.5;
}

.gwp-mt-empty h3 {
  font-size: var(--gwp-font-size-xl);
  margin: 0 0 var(--gwp-space-sm) 0;
  color: var(--gwp-text-primary);
}

.gwp-mt-empty p {
  margin: 0;
  font-size: var(--gwp-font-size-base);
}

/* Error State */
.gwp-mt-error {
  background: rgb(239 68 68 / 0.1);
  border: 1px solid var(--gwp-error);
  border-radius: var(--gwp-radius-md);
  padding: var(--gwp-space-lg);
  color: var(--gwp-error);
  text-align: center;
  font-weight: 500;
}

/* Hidden elements */
[style*="display: none"] {
  display: none !important;
}

/* Responsive Breakpoints */

/* Mobile optimizations */
@media (max-width: 640px) {
  .gwp-mt-cards {
    gap: var(--gwp-space-md);
  }
  
  .gwp-mt-card {
    padding: var(--gwp-space-sm);
  }
  
  .gwp-mt-activity-title {
    font-size: var(--gwp-font-size-base);
    line-height: 1.2;
  }
  
  .gwp-mt-cost {
    font-size: var(--gwp-font-size-xs);
    padding: 2px 6px;
  }
  
  .gwp-mt-location {
    font-size: var(--gwp-font-size-xs);
    margin-bottom: var(--gwp-space-xs);
  }
  
  .gwp-mt-meta {
    font-size: var(--gwp-font-size-xs);
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  
  .gwp-mt-day-header {
    padding: var(--gwp-space-sm) var(--gwp-space-md);
  }
  
  .gwp-mt-day-title {
    font-size: var(--gwp-font-size-lg);
  }
}

/* Small tablets */
@media (min-width: 640px) {
  .gwp-mt-cards {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
  
  .gwp-mt-filter-row {
    flex-wrap: nowrap;
  }
}

/* Medium tablets */
@media (min-width: 768px) {
  .gwp-modern-timetable {
    padding: var(--gwp-space-lg);
  }
  
  .gwp-mt-cards {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--gwp-space-xl);
  }
  
  .gwp-mt-filters {
    padding: var(--gwp-space-xl);
  }
  
  .gwp-mt-search-wrapper {
    max-width: 400px;
  }
}

/* Large tablets & small desktops */
@media (min-width: 1024px) {
  .gwp-mt-cards {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  }
  
  .gwp-mt-filter-row {
    justify-content: flex-start;
  }
  
  .gwp-mt-filter {
    flex: 0 1 200px;
  }
  
  .gwp-mt-search-wrapper {
    max-width: 500px;
  }
}

/* Large desktops */
@media (min-width: 1280px) {
  .gwp-mt-cards {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  }
}

/* Extra large screens */
@media (min-width: 1536px) {
  .gwp-modern-timetable {
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .gwp-mt-card {
    border-width: 2px;
  }
  
  .gwp-mt-search,
  .gwp-mt-filter {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .gwp-mt-card:hover {
    transform: none;
  }
}

/* Print styles */
@media print {
  .gwp-mt-filters,
  .gwp-mt-results-info {
    display: none;
  }
  
  .gwp-mt-cards {
    display: block;
  }
  
  .gwp-mt-card {
    break-inside: avoid;
    margin-bottom: var(--gwp-space-lg);
    box-shadow: none;
    border: 1px solid #000;
  }
}