/* Apple-Style Time Picker */

/* Inline Time Picker */
.inline-time-picker {
  background: var(--survey-white);
  border: 2px solid var(--survey-primary);
  border-radius: 1rem;
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  animation: slideDown 0.3s ease;
}

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

.inline-time-picker-header {
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--survey-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--survey-gray-100);
}

.inline-time-picker-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--survey-gray-100);
}

.time-picker-cancel,
.time-picker-confirm {
  flex: 1;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.time-picker-cancel {
  background: var(--survey-gray-100);
  color: var(--survey-gray-600);
}

.time-picker-cancel:hover {
  background: var(--survey-gray-200);
}

.time-picker-confirm {
  background: var(--survey-primary);
  color: white;
}

.time-picker-confirm:hover {
  background: var(--survey-secondary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.time-picker-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.time-picker-wheels {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--survey-gray-100);
  padding: 1rem;
  border-radius: 1rem;
  position: relative;
}

.time-picker-wheels::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 48px;
  transform: translateY(-50%);
  background: rgba(59, 130, 246, 0.1);
  border-radius: 0.5rem;
  border: 2px solid var(--survey-primary);
  pointer-events: none;
  z-index: 1;
}

.time-wheel {
  display: flex;
  flex-direction: column;
  height: 200px;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
  width: 80px;
  position: relative;
}

.time-wheel::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.time-option {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--survey-gray-400);
  cursor: pointer;
  scroll-snap-align: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  border-radius: 0.5rem;
  z-index: 2;
  position: relative;
}

.time-option:hover {
  color: var(--survey-primary);
  background: rgba(59, 130, 246, 0.05);
}

.time-option.selected {
  color: var(--survey-primary);
  font-weight: 700;
  transform: scale(1.1);
}

.time-option-spacer {
  height: 48px;
  flex-shrink: 0;
  scroll-snap-align: center;
}

.time-separator {
  font-size: 2rem;
  font-weight: 700;
  color: var(--survey-gray-600);
  margin: 0 0.25rem;
  align-self: center;
  z-index: 2;
  position: relative;
}

.time-picker-preview {
  font-size: 2rem;
  font-weight: 700;
  color: var(--survey-primary);
  text-align: center;
  padding: 1rem 2rem;
  background: var(--survey-bg);
  border-radius: 0.75rem;
  min-width: 200px;
}

/* Improved time button styling for main survey */
.survey-time-btn {
  padding: 0.5rem 1rem;
  background: var(--survey-white);
  border: 2px solid var(--survey-gray-200);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--survey-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.survey-time-btn:hover {
  border-color: var(--survey-primary);
  background: var(--survey-bg);
}

.survey-time-btn:active {
  transform: scale(0.98);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .inline-time-picker {
    padding: 0.75rem;
    margin: 0.75rem 0;
  }

  .inline-time-picker-header {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
  }

  .inline-time-picker-actions {
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
  }

  .time-picker-cancel,
  .time-picker-confirm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }

  .time-picker-container {
    gap: 1.5rem;
  }

  .time-picker-wheels {
    padding: 0.75rem;
    gap: 0.25rem;
    max-width: 100%;
  }

  .time-wheel {
    width: 60px;
    height: 180px;
  }

  .time-option {
    font-size: 1.25rem;
    height: 40px;
  }

  .time-option-spacer {
    height: 40px;
  }

  .time-picker-wheels::before {
    height: 40px;
  }

  .time-separator {
    font-size: 1.5rem;
    margin: 0;
  }

  .time-picker-preview {
    font-size: 1.5rem;
    padding: 0.75rem 1.5rem;
    min-width: 150px;
  }

  .survey-time-btn {
    min-width: 80px;
    font-size: 0.875rem;
  }
}
