/**
 * Weekly View Styles - Vistas semanal y de horario
 */

/* Weekly View */
.weekly-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border-radius: 8px;
}

.weekly-header .week-label {
  font-weight: bold;
  color: #DC143C;
  font-size: 1.1rem;
  flex: 1;
  text-align: center;
}

.btn-nav-week {
  background: #DC143C;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.btn-nav-week:hover {
  background: #b30a2d;
  transform: scale(1.05);
}

.weekly-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.weekly-day {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.weekly-day:hover {
  box-shadow: 0 4px 12px rgba(220, 20, 60, 0.2);
  border-color: #DC143C;
}

.weekly-day.today {
  border-color: #22863a;
  background: #f0fff4;
}

.weekly-day-header {
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  color: white;
  padding: 0.75rem;
  text-align: center;
  border-bottom: 2px solid #DC143C;
}

.weekly-day-name {
  font-weight: bold;
  font-size: 0.95rem;
}

.weekly-day-date {
  font-size: 1.3rem;
  font-weight: bold;
  color: #DC143C;
}

.weekly-day-content {
  padding: 0.75rem;
  min-height: 150px;
  max-height: 200px;
  overflow-y: auto;
}

.weekly-day-empty {
  color: #999;
  font-style: italic;
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem 0;
}

.weekly-create-btn {
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 6px;
  background: linear-gradient(135deg, #22863a, #1f6f2e);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.weekly-create-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(34, 134, 58, 0.3);
}

.weekly-routine-item {
  background: #f5f5f5;
  padding: 0.6rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.weekly-routine-item:hover {
  background: #efefef;
  transform: translateX(2px);
}

.weekly-routine-name {
  font-weight: bold;
  font-size: 0.95rem;
  color: #1a1a1a;
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weekly-routine-blocks {
  font-size: 0.8rem;
  color: #666;
}

/* Schedule Grid / Horario */
.schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
  border-radius: 8px;
}

.schedule-header h3 {
  color: #DC143C;
  margin: 0;
  flex: 1;
  text-align: center;
}

.schedule-header-center {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-calendar {
  padding: 0.5rem 0.75rem;
}

#scheduleDatePicker {
  border: 1px solid #444;
  background: #111;
  color: #fff;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.schedule-grid {
  display: flex;
  gap: 0;
  background: white;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  height: 1200px;
  position: relative;
}

.schedule-hours {
  display: flex;
  flex-direction: column;
  width: 80px;
  background: #f5f5f5;
  border-right: 2px solid #ddd;
  flex-shrink: 0;
}

.schedule-hour {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  color: #666;
  border-bottom: 1px solid #e0e0e0;
}

.schedule-content {
  flex: 1;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
}

.schedule-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #999;
  font-style: italic;
  font-size: 0.95rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.schedule-error {
  color: #b30a2d;
  background: #ffe9ed;
  border: 1px solid #f2b8c4;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 600;
}

.schedule-hour-bg {
  height: calc(1200px / 24);
  border-bottom: 1px solid #e0e0e0;
  position: relative;
}

.schedule-block {
  position: absolute;
  left: 10px;
  right: 10px;
  border-radius: 4px;
  padding: 0.5rem;
  color: white;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.schedule-block:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.schedule-block-routine {
  font-weight: bold;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-block-name {
  font-size: 0.8rem;
  opacity: 0.95;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-block-time {
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 1;
  margin-top: 0.35rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  display: inline-block;
}

/* Responsive - Tablets */
@media (max-width: 768px) {
  .weekly-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.4rem;
  }

  .weekly-day-content {
    min-height: 120px;
    max-height: 150px;
  }

  .schedule-grid {
    height: 400px;
  }

  .schedule-hour-bg {
    height: calc(400px / 24);
  }

  .schedule-hours {
    width: 60px;
  }

  .schedule-hour {
    font-size: 0.7rem;
  }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
  .weekly-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.3rem;
  }

  .weekly-header {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .weekly-header .week-label {
    font-size: 0.9rem;
  }

  .btn-nav-week {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  .weekly-day-content {
    min-height: 100px;
    max-height: 120px;
  }

  .weekly-day-name {
    font-size: 0.85rem;
  }

  .weekly-day-date {
    font-size: 1.1rem;
  }

  .weekly-routine-name {
    font-size: 0.85rem;
  }

  .schedule-header {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .schedule-header h3 {
    font-size: 1rem;
    margin: 0;
  }

  .schedule-grid {
    height: 300px;
  }

  .schedule-hour-bg {
    height: calc(300px / 24);
  }

  .schedule-hours {
    width: 50px;
  }

  .schedule-hour {
    font-size: 0.65rem;
  }

  .schedule-block {
    left: 5px;
    right: 5px;
  }

  .schedule-block-routine {
    font-size: 0.75rem;
  }

  .schedule-block-name {
    font-size: 0.7rem;
  }

  .schedule-block-time {
    font-size: 0.6rem;
  }
}
