label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.relative {
  position: relative;
}

.calendar-icon {
  position: absolute;
  top: 20%;
  right: 1.5rem;
  transform: translateY(-45%);
  cursor: pointer;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0.75rem;
  z-index: 10;
}

.calendar-container {
  display: none;
  position: absolute;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 30;
  padding: 1rem;
  max-width: 320px;
  width: 100%;
  animation: fadeIn 0.2s ease-in;
  top: 3.5rem;
  left: 0;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.calendar-header select {
  padding: 0.25rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  text-align: center;
}

.calendar-grid div {
  padding: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  border-radius: 0.25rem;
  touch-action: manipulation;
}

.calendar-grid .day-name {
  font-weight: 600;
  color: #374151;
}

.calendar-grid .day:hover {
  background: #f3f4f6;
}

.calendar-grid .selected {
  background: #3b82f6;
  color: #fff;
  font-weight: 500;
}

.calendar-grid .disabled {
  color: #d1d5db;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .calendar-container {
    position: absolute;
    top: 3.5rem;
    left: 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .calendar-grid div {
    padding: 0.4rem;
    font-size: 0.8rem;
  }
}