/* Playlist Calendar - Styles */

.playlist-calendar-container {
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: 30px;
  margin: 20px 0;
  min-height: 600px;
}

/* Section calendrier et liste (colonne gauche) */
.calendar-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Wrapper calendrier */
.calendar-wrapper {
  background: var(--ast-global-color-4);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* En-tête calendrier avec navigation */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.calendar-title {
  flex: 1;
  text-align: center;
}

.calendar-title span {
  font-size: 18px;
  font-weight: 700;
  color: var(--ast-global-color-1);
  text-transform: capitalize;
}

.calendar-nav-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--ast-global-color-1);
  background: white;
  color: var(--ast-global-color-1);
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.calendar-nav-btn:hover {
  background: var(--ast-global-color-1);
  color: white;
  transform: scale(1.1);
}

.calendar-nav-btn:active {
  transform: scale(0.95);
}

/* Grille calendrier avec numéros de semaine */
.calendar-grid {
  display: grid;
  grid-template-columns: 35px repeat(7, 1fr);
  gap: 8px;
}

.week-number {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #666;
  background: #f0f0f0;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.week-number:hover {
  background: #e0e0e0;
  color: var(--ast-global-color-1);
  transform: scale(1.05);
}

.week-number.selected-week {
  background: var(--ast-global-color-1);
  color: white;
  border-color: var(--ast-global-color-1);
}

.calendar-day-header {
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--ast-global-color-1);
  padding: 10px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: default;
  font-size: 14px;
  font-weight: 500;
  background: #f5f5f5;
  color: #999;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  position: relative;
  min-height: 45px;
}

.calendar-day.empty {
  background: transparent;
}

.calendar-day.has-playlist {
  background: white;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.calendar-day.has-playlist::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--ast-global-color-1);
  border-radius: 50%;
}

.calendar-day.has-playlist:hover {
  background: color-mix(in srgb, var(--ast-global-color-1) 10%, white);
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-day.selected {
  background: var(--ast-global-color-1);
  color: white;
  border-color: var(--ast-global-color-1);
  transform: scale(1.05);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--ast-global-color-1) 40%, transparent);
}

.calendar-day.selected::after {
  background: white;
}

.calendar-day.selected:hover {
  background: color-mix(in srgb, var(--ast-global-color-1) 90%, black);
  transform: scale(1.08);
}

.calendar-day.today {
  border-color: var(--ast-global-color-1);
  border-width: 1px;
}

/* Section liste des playlists */
.playlists-list-section {
  background: var(--ast-global-color-4);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.playlists-list-section h3 {
  margin: 0 0 15px 0;
  color: var(--ast-global-color-1);
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ast-global-color-1);
}

.playlists-list {
  max-height: 450px;
  overflow-y: auto;
  overflow-x: hidden;
}

.playlist-item {
  padding: 15px;
  margin-bottom: 10px;
  margin-right: 10px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.playlist-item:hover {
  border-color: var(--ast-global-color-1);
  background: color-mix(in srgb, var(--ast-global-color-1) 5%, white);
  transform: translateX(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.playlist-item.active {
  border-color: var(--ast-global-color-1);
  background: color-mix(in srgb, var(--ast-global-color-1) 15%, white);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--ast-global-color-1) 30%, transparent);
}

.playlist-item-name {
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.3;
}

.playlist-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #666;
  flex-wrap: wrap;
}

.playlist-item-info img {
  height: 30px;
}

.playlist-platform {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--ast-global-color-1);
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.playlist-dates {
  color: #888;
  font-weight: 500;
}

.no-playlist {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-style: italic;
  font-size: 15px;
}

/* Section visualisation playlist (colonne droite) */
.playlist-viewer-section {
  background: var(--ast-global-color-4);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-height: 600px;
}

.playlist-viewer {
  min-height: 100%;
}

.no-selection {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-style: italic;
  font-size: 17px;
}

.loading-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--ast-global-color-1);
  font-size: 17px;
  font-weight: 600;
}

.loading-message::after {
  content: '...';
  animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {

  0%,
  20% {
    content: '.';
  }

  40% {
    content: '..';
  }

  60%,
  100% {
    content: '...';
  }
}
.playlists-list {
  scrollbar-width: thin;
  scrollbar-color: var(--ast-global-color-0) var(--ast-global-color-4);
}

/* Scrollbar personnalisée */
.playlists-list::-webkit-scrollbar {
  width: 8px;
}

.playlists-list::-webkit-scrollbar-track {
  background: var(--ast-global-color-4);
  border-radius: 5px;
}

.playlists-list::-webkit-scrollbar-thumb {
  background: var(--ast-global-color-1);
  border-radius: 4px;
}

.playlists-list::-webkit-scrollbar-thumb:hover {
  background: var(--ast-global-color-0);
}

/* Responsive */
@media (max-width: 1200px) {
  .playlist-calendar-container {
    grid-template-columns: 400px 1fr;
  }
}

@media (max-width: 1024px) {
  .playlist-calendar-container {
    grid-template-columns: 1fr;
  }

  .calendar-section {
    order: 1;
  }

  .playlist-viewer-section {
    order: 2;
    min-height: 400px;
  }
}

@media (max-width: 768px) {
  .calendar-wrapper {
    padding: 15px;
  }

  .calendar-grid {
    grid-template-columns: 30px repeat(7, 1fr);
    gap: 5px;
  }

  .calendar-day {
    font-size: 12px;
    min-height: 38px;
  }

  .calendar-day-header {
    font-size: 10px;
    padding: 8px 2px;
  }

  .calendar-nav-btn {
    width: 35px;
    height: 35px;
    font-size: 20px;
  }

  .calendar-title span {
    font-size: 16px;
  }

  .week-number {
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  .playlist-calendar-container {
    gap: 15px;
  }

  .calendar-day {
    font-size: 11px;
    min-height: 32px;
  }

  .calendar-day.has-playlist::after {
    width: 4px;
    height: 4px;
    bottom: 4px;
  }
}