/*!
* Schedules anime list style
* version: 2.0
* Author: MarceloTLD (https://github.com/MarceloTLD)
* Adapted for WordPress by: Jach (https://wptheme.site/)
* Adapted to PulseGrid Pro theme colors
* Release under MIT License
*/

/* CSS Variables for Light Mode (Default) */
.crv\:schedules {
  --schedules-bg-primary: #f5f5f5;
  --schedules-bg-secondary: #ffffff;
  --schedules-text-primary: #333;
  --schedules-text-secondary: #666;
  --schedules-nav-bg: #ffffff;
  --schedules-nav-text: #333333;
  --schedules-nav-active-bg: #2196F3;
  --schedules-nav-active-text: #ffffff;
  --schedules-card-bg: #ffffff;
  --schedules-card-shadow: rgba(0, 0, 0, 0.1);
  --schedules-border-color: #e0e0e0;
  --schedules-hover-bg: rgba(33, 150, 243, 0.1);
  --schedules-link-color: #2196F3;
  --schedules-hoy-bg: #1976D2;
  --schedules-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schedules-col-width: 160px;
  
  font-family: var(--schedules-font-family);
  background: var(--schedules-bg-primary);
  border-radius: 8px;
  overflow: hidden;
}

/* Dark Mode Variables */
[data-theme="dark"] .crv\:schedules {
  --schedules-bg-primary: #1a1a1a;
  --schedules-bg-secondary: #2d2d2d;
  --schedules-text-primary: #e0e0e0;
  --schedules-text-secondary: #b0b0b0;
  --schedules-nav-bg: #1a1a1a;
  --schedules-nav-text: #e0e0e0;
  --schedules-nav-active-bg: #e74c3c;
  --schedules-nav-active-text: #ffffff;
  --schedules-card-bg: #2d2d2d;
  --schedules-card-shadow: rgba(0, 0, 0, 0.3);
  --schedules-border-color: #404040;
  --schedules-hover-bg: rgba(231, 76, 60, 0.15);
  --schedules-link-color: #e74c3c;
}

/* Main Container */
.crv\:schedules {
  display: flex;
  flex-direction: column;
  margin: 20px 0;
}

/* Horizontal Navigation Bar */
.crv\:schedules__navigation {
  display: flex;
  background: var(--schedules-nav-bg);
  border-radius: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--schedules-nav-active-bg) transparent;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .crv\:schedules__navigation {
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

.crv\:schedules__navigation::-webkit-scrollbar {
  height: 4px;
}

.crv\:schedules__navigation::-webkit-scrollbar-track {
  background: transparent;
}

.crv\:schedules__navigation::-webkit-scrollbar-thumb {
  background: var(--schedules-nav-active-bg);
  border-radius: 2px;
}

/* Day Tab Buttons */
.crv\:schedules__dayName {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 16px;
  user-select: none;
  touch-action: auto;
  color: var(--schedules-nav-text);
  background: transparent;
  border: none;
  white-space: nowrap;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 13px;
  flex-shrink: 0;
  position: relative;
  border-radius: 6px;
}

.crv\:schedules__dayName:hover {
  background: rgba(255, 255, 255, 0.1);
}

.crv\:schedules__dayName h2 {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  color: inherit;
}

.crv\:schedules__dayName .day-label {
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
  background: var(--schedules-hoy-bg, #d84315);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .crv\:schedules__dayName .day-label {
  background: #d84315;
}

.crv\:schedules__dayName svg {
  display: none;
}

/* Active Day Tab */
.crv\:schedules__day.is-active .crv\:schedules__dayName {
  background: var(--schedules-nav-active-bg);
  color: var(--schedules-nav-active-text);
  border-radius: 6px;
}

.crv\:schedules__day.is-active .crv\:schedules__dayName::after {
  display: none;
}

/* Day Indicator */
.crv\:schedules__day-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 16px 0;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--schedules-border-color);
}

.crv\:schedules__day-indicator svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--schedules-text-primary);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.crv\:schedules__day-indicator .day-label-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--schedules-text-primary);
}

/* Content Area */
.crv\:schedules__content {
  background: var(--schedules-bg-secondary);
  padding: 24px;
  min-height: 400px;
  border-radius: 0 0 8px 8px;
  margin-top: 0;
}

/* Day Content Sections */
.crv\:schedules__day {
  display: inline-block;
}

.crv\:schedules__entries {
  display: none;
  flex-direction: column;
}

.crv\:schedules__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 20px;
  padding: 0;
}

@media (max-width: 1024px) {
  .crv\:schedules__grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
  }
}

.crv\:schedules__entries.is-active {
  display: flex;
}

/* Anime Card Item */
.crv\:schedules-item {
  display: flex;
  flex-direction: column;
  background: var(--schedules-card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--schedules-card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.crv\:schedules-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px var(--schedules-card-shadow);
}

/* Clickable Card Links */
.crv\:schedules__entries > a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.crv\:schedules__entries > a:hover {
  opacity: 1;
}

.crv\:schedules__entries > a .crv\:schedules-item {
  cursor: pointer;
}

.crv\:schedules-item__image {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.crv\:schedules-item__image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 5/7;
  display: block;
  transition: transform 0.3s ease;
}

.crv\:schedules-item:hover .crv\:schedules-item__image img {
  transform: scale(1.01);
}

.crv\:schedules-item__title {
  font-size: 13px;
  font-weight: 600;
  padding: 2px 10px 6px 10px;
  margin-top: -2px;
  color: var(--schedules-text-primary);
  line-height: 1.3;
  min-height: 50px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Loader */
.crv\:schedules__loader {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  color: var(--schedules-text-secondary);
  padding: 40px;
  text-align: center;
}

.crv\:schedules__loader [data-loader] {
  width: 24px;
  height: 24px;
  border: 3px solid var(--schedules-border-color);
  border-top-color: var(--schedules-nav-active-bg);
  border-radius: 50%;
  display: inline-block;
  vertical-align: middle;
  margin-right: 12px;
  animation: 1s infinite spinner;
}

@keyframes spinner {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Design - Mobile */
@media screen and (max-width: 900px) {
  .crv\:schedules {
    border-radius: 12px;
    margin: 10px;
  }
  
  .crv\:schedules__navigation {
    padding: 6px;
    gap: 6px;
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  
  .crv\:schedules__navigation::-webkit-scrollbar {
    display: none;
  }
  
  .crv\:schedules__dayName {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 10px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  .crv\:schedules__dayName h2 {
    font-size: 14px;
  }
  
  .crv\:schedules__dayName .day-label {
    font-size: 9px;
    padding: 2px 6px;
    margin-left: 6px;
  }
  
  .crv\:schedules__content {
    padding: 16px;
    border-radius: 0 0 12px 12px;
    background: var(--schedules-bg-secondary);
  }
  
  .crv\:schedules__day-indicator {
    padding: 12px 0;
    margin-bottom: 16px;
    background: transparent;
    border-bottom: 1px solid var(--schedules-border-color);
  }
  
  .crv\:schedules__day-indicator svg {
    width: 24px;
    height: 24px;
  }
  
  .crv\:schedules__day-indicator .day-label-text {
    font-size: 20px;
    font-weight: 700;
  }
  
  .crv\:schedules__entries .crv\:schedules__grid,
  .crv\:schedules__grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    display: grid !important;
  }
  
  .crv\:schedules-item {
    border-radius: 12px;
    width: 100%;
  }
  
  .crv\:schedules-item__image {
    border-radius: 12px 12px 0 0;
  }
  
  .crv\:schedules-item__title {
    font-size: 12px;
    padding: 4px 8px 8px 8px;
    min-height: 45px;
    line-height: 1.3;
  }
}

@media screen and (max-width: 600px) {
  .crv\:schedules {
    margin: 8px;
  }
  
  .crv\:schedules__navigation {
    padding: 5px;
    gap: 5px;
  }
  
  .crv\:schedules__dayName {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .crv\:schedules__dayName h2 {
    font-size: 13px;
  }
  
  .crv\:schedules__dayName .day-label {
    font-size: 8px;
    padding: 2px 5px;
  }
  
  .crv\:schedules__content {
    padding: 12px;
  }
  
  .crv\:schedules__day-indicator {
    padding: 10px 0;
    margin-bottom: 12px;
  }
  
  .crv\:schedules__day-indicator .day-label-text {
    font-size: 18px;
  }
  
  .crv\:schedules__entries .crv\:schedules__grid,
  .crv\:schedules__grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  
  .crv\:schedules-item__title {
    font-size: 11px;
    padding: 3px 6px 6px 6px;
    min-height: 40px;
  }
}
