/**
 * Scheduler Component Styles
 * Styles for the meeting scheduler component
 */

/* Scheduler section wrapper */
.scheduler-section {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Base scheduler container */
.scheduler-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Scheduler header */
.scheduler-header {
  text-align: center;
  margin-bottom: 2rem;
}

.scheduler-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.scheduler-subtitle {
  font-size: 1.125rem;
  color: #666;
}

/* Card styles */
.scheduler-card {
  /* background: white; */
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Quick navigation buttons */
.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.quick-nav-button {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.quick-nav-button:hover {
  background: #f5f5f5;
}

/* Day navigation */
.day-navigation {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  justify-content: center;
}

.day-button {
  min-width: 140px;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  position: relative;
}

.day-button:hover {
  background: #f5f5f5;
}

.day-button.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.day-button .day-name {
  font-weight: 600;
  display: block;
}

.day-button .day-date {
  font-size: 0.75rem;
  opacity: 0.8;
}

.day-button .good-slots-indicator {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 12px;
  height: 12px;
  background: #28a745;
  border-radius: 50%;
  border: 2px solid white;
}

/* Timeline visualization */
.timeline-container {
  margin-bottom: 1.5rem;
}

.timeline-wrapper {
  margin-bottom: 1.5rem;
}

.timeline-wrapper:last-child {
  margin-bottom: 0;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.timeline-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.timeline {
  position: relative;
  height: 96px;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
}

.timeline:active {
  cursor: grabbing;
}

.timeline-hour {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc(100% / 24);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.timeline-hour.zone-sleep {
  background: rgba(220, 53, 69, 0.1);
}

.timeline-hour.zone-business {
  background: rgba(40, 167, 69, 0.1);
}

.timeline-hour.zone-transition {
  background: rgba(255, 193, 7, 0.1);
}

.timeline-hour-label {
  position: absolute;
  top: 4px;
  left: 4px;
  font-size: 0.75rem;
  color: #666;
  z-index: 1;
  font-weight: 600;
}

/* Meeting block on timeline */
.meeting-block {
  position: absolute;
  top: 0;
  height: 100%;
  border: 2px solid;
  border-radius: 4px;
  pointer-events: none;
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

.meeting-block.quality-ideal {
  background: rgba(40, 167, 69, 0.4);
  border-color: #28a745;
  color: #155724;
}

.meeting-block.quality-good {
  background: rgba(255, 193, 7, 0.4);
  border-color: #ffc107;
  color: #856404;
}

.meeting-block.quality-caution {
  background: rgba(255, 193, 7, 0.4);
  border-color: #ffc107;
  color: #856404;
}

.meeting-block.quality-avoid {
  background: rgba(220, 53, 69, 0.4);
  border-color: #dc3545;
  color: #721c24;
}

/* Current time indicator */
.current-time-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #dc3545;
  z-index: 15;
  pointer-events: none;
  animation: pulse 2s infinite;
}

.current-time-indicator::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -3px;
  width: 8px;
  height: 8px;
  background: #dc3545;
  border-radius: 50%;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* Scheduling advisor - compact banner style */
.scheduling-advisor {
  border-left: 4px solid;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.scheduling-advisor.quality-ideal {
  border-left-color: #28a745;
  background: rgba(40, 167, 69, 0.05);
}

.scheduling-advisor.quality-good {
  border-left-color: #ffc107;
  background: rgba(255, 193, 7, 0.05);
}

.scheduling-advisor.quality-caution {
  border-left-color: #ffc107;
  background: rgba(255, 193, 7, 0.05);
}

.scheduling-advisor.quality-avoid {
  border-left-color: #dc3545;
  background: rgba(220, 53, 69, 0.05);
}

.advisor-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.advisor-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.advisor-icon {
  font-size: 1rem;
  line-height: 1;
}

.advisor-summary {
  color: #333;
}

.advisor-times {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.advisor-time-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.advisor-time-label {
  font-size: 0.75rem;
  color: #666;
  font-weight: 500;
}

.advisor-time-value {
  font-family: monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
}

.advisor-time-separator {
  color: #999;
  font-size: 0.875rem;
  font-weight: 300;
}

/* Recommendations - Compact Horizontal Cards */
.recommendations-container {
  margin-bottom: 1rem;
}

.recommendations-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  /* Hide scrollbar but keep functionality */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.recommendations-scroll::-webkit-scrollbar {
  height: 6px;
}

.recommendations-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.recommendations-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.recommendations-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.recommendation-slot {
  flex: 0 0 auto;
  width: 150px;
  min-height: 65px;
  padding: 0.625rem 0.75rem;
  border: 2px solid;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.375rem;
  scroll-snap-align: start;
  position: relative;
}

.recommendation-slot:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.recommendation-slot.quality-ideal {
  border-color: rgba(40, 167, 69, 0.5);
  background: rgba(40, 167, 69, 0.06);
}

.recommendation-slot.quality-ideal:hover {
  border-color: rgba(40, 167, 69, 0.7);
  background: rgba(40, 167, 69, 0.1);
}

.recommendation-slot.quality-good {
  border-color: rgba(255, 193, 7, 0.5);
  background: rgba(255, 193, 7, 0.06);
}

.recommendation-slot.quality-good:hover {
  border-color: rgba(255, 193, 7, 0.7);
  background: rgba(255, 193, 7, 0.1);
}

.recommendation-slot.selected {
  border-color: #007bff;
  background: rgba(0, 123, 255, 0.1);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2);
}

.recommendation-slot.selected.quality-ideal {
  border-color: #28a745;
  background: rgba(40, 167, 69, 0.15);
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.3);
}

.recommendation-slot.selected.quality-good {
  border-color: #ffc107;
  background: rgba(255, 193, 7, 0.15);
  box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
}

.recommendation-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  align-self: flex-start;
}

.recommendation-badge.ideal {
  background: #28a745;
  color: white;
}

.recommendation-badge.good {
  background: #ffc107;
  color: #856404;
}

.recommendation-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  line-height: 1.2;
}

.recommendation-time-conversion {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  justify-content: center;
}

.recommendation-time-main {
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  font-size: 0.85rem;
}

.recommendation-time-zone {
  font-size: 0.65rem;
  color: #666;
  font-weight: 500;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  text-align: center;
}

.recommendation-time-arrow {
  color: #666;
  font-size: 0.7rem;
  flex-shrink: 0;
  margin: 0 0.125rem;
}

/* Toast notifications */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

.scheduler-toast {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive design */
@media (max-width: 768px) {
  .scheduler-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 0;
  }

  .scheduler-container {
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  .scheduler-card {
    padding: 1.25rem 1rem;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1.25rem;
    border-radius: 0;
  }

  .scheduler-title {
    font-size: 1.5rem;
  }

  .scheduling-advisor {
    padding: 1rem;
    margin-bottom: 1.25rem;
  }

  .timeline-container {
    margin-bottom: 1.25rem;
  }

  .timeline-wrapper {
    margin-bottom: 1.25rem;
  }

  .timeline-header {
    margin-bottom: 1rem;
    padding: 0 0.5rem;
  }

  .timeline {
    height: 100px;
    margin: 0 0.5rem;
  }

  .recommendations-container {
    margin-bottom: 1.25rem;
    padding: 0 0.5rem;
  }

  .recommendations-scroll {
    padding: 0.75rem 0;
  }

  .recommendation-slot {
    width: 160px;
    min-height: 70px;
    padding: 0.75rem;
  }

  .recommendation-time {
    font-size: 0.8rem;
    gap: 0.3rem;
  }

  .recommendation-time-conversion {
    gap: 0.375rem;
  }

  .recommendation-time-main {
    font-size: 0.85rem;
  }

  .recommendation-time-zone {
    font-size: 0.65rem;
  }

  .recommendation-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }

  .timeline-hour-label {
    font-size: 0.7rem;
    left: 6px;
    top: 6px;
  }

  .advisor-content {
    gap: 0.75rem;
  }

  .advisor-status {
    font-size: 0.9375rem;
  }

  .advisor-times {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .advisor-time-separator {
    display: none;
  }

  .advisor-time-item {
    width: 100%;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .advisor-time-label {
    font-size: 0.8rem;
  }

  .advisor-time-value {
    font-size: 0.9375rem;
  }
}
