/* Prevent background scroll when picker is open */
body.picker-open {
  touch-action: none;
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Scope all picker styles under .custom-timepicker */
.custom-timepicker {
  position: relative;
  display: block;
}

/* Match form inputs */
.custom-timepicker .time-input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  padding: 0.5rem;
  font-size: 1rem;
  color: #333;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.custom-timepicker .time-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* Overlay backdrop */
.custom-timepicker .picker-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

.custom-timepicker .picker-overlay.active {
  display: flex;
}

/* White “card” modal matching your .card */
.custom-timepicker .time-picker {
  background: #ffffff;
  border-radius: 37px;
  padding: 2.5rem;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.3s ease;
}

/* Header */
.custom-timepicker .picker-header {
  text-align: center;
  margin-bottom: 1rem;
}

.custom-timepicker .picker-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
}

.custom-timepicker .selected-time {
  font-size: 2rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 1.5rem;
}

/* Wheels layout */
.custom-timepicker .time-wheels {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.custom-timepicker .wheel {
  flex: 1;
}

.custom-timepicker .wheel-label {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.5rem;
}

/* Wheel container styling */
.custom-timepicker .wheel-container {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.custom-timepicker .wheel-list {
  list-style: none;
  margin: 0;
  padding: 75px 0;
  transition: transform 0.3s ease;
}

.custom-timepicker .wheel-item {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #555;
  cursor: pointer;
  transition: background 0.2s;
}

.custom-timepicker .wheel-item.selected {
  color: #2EAAFA;
  font-weight: 600;
}

.custom-timepicker .wheel-item:hover {
  background: rgba(46, 170, 250, 0.1);
}

.custom-timepicker .wheel-highlight {
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 50px;
  transform: translateY(-50%);
  background: rgba(46, 170, 250, 0.1);
  border-radius: 8px;
  pointer-events: none;
}

/* Action buttons */
.custom-timepicker .picker-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.custom-timepicker .btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.custom-timepicker .btn-primary {
  background: linear-gradient(135deg, #2EAAFA 0%, #1F2F98 100%);
  color: #fff;
  box-shadow: 0 5px 15px rgba(31, 47, 152, 0.3);
}

.custom-timepicker .btn-primary:hover {
  box-shadow: 0 7px 20px rgba(31, 47, 152, 0.4);
  transform: translateY(-2px);
}

.custom-timepicker .btn-secondary {
  background: #fff;
  color: #555;
  border: 1px solid #ccc;
}

.custom-timepicker .btn-secondary:hover {
  background: #f8f9fa;
}

/* Keyframe animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Responsive tweaks */
@media (max-width: 480px) {
  .custom-timepicker .time-wheels {
    gap: 0.25rem;
  }
  .custom-timepicker .time-picker {
    padding: 2rem;
  }
}
