/* Subscription Container - Make it as wide as possible */
.subscription-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.subscription-form {
  background: white;
  padding: 3rem;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 900px;
  min-width: 800px; /* Ensure minimum usable width */
}

/* Mobile responsiveness for subscription form */
@media (max-width: 768px) {
  .subscription-form {
    padding: 1.5rem;
    max-width: 100vw;
    min-width: auto;
  }
}

/* Custom Flatpickr styling */
.flatpickr-calendar {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #e9ecef;
}

.flatpickr-day.disabled {
  color: #dee2e6;
  cursor: not-allowed;
}

.flatpickr-day.selected {
  background: #007bff;
  border-color: #007bff;
}

.flatpickr-day:hover:not(.disabled) {
  background: #f8f9fa;
}

/* Date field styling */
#start-date-field {
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border-radius: 4px;
  padding: 8px 12px;
  cursor: pointer;
}

/* Ensure the date field is properly styled for Flatpickr */
.flatpickr-input {
  width: 100% !important;
  font-size: 14px !important;
}

/* Make sure the calendar icon is visible */
.flatpickr-calendar {
  z-index: 9999;
}

/* Ensure proper styling for the date input */
#start-date-field.flatpickr-input {
  background-color: #f8f9fa !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  padding: 8px 12px !important;
  cursor: pointer !important;
}

/* Quantity Selector Styling */
.quantity-selector {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 0;
  margin-top: 8px;
  background-color: #f8f9fa;
  overflow: hidden;
}

.quantity-btn {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.quantity-minus {
  background-color: #dc3545;
  color: white;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.quantity-minus:hover:not(:disabled) {
  background-color: #c82333;
}

.quantity-minus:disabled {
  background-color: #f5c6cb;
  color: #721c24;
  cursor: not-allowed;
}

.quantity-plus {
  background-color: #28a745;
  color: white;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.quantity-plus:hover {
  background-color: #218838;
}

.quantity-display {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  height: 40px;
  background-color: white;
  border-left: 1px solid #ced4da;
  border-right: 1px solid #ced4da;
}

.quantity-display span {
  font-size: 16px;
  font-weight: 600;
  color: #495057;
}

#start-date-field:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#date-help-text {
  font-size: 0.875rem;
  margin-top: 4px;
  display: block;
}

/* Quick action buttons for delivery days */
.delivery-days-quick-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.delivery-days-quick-actions .btn {
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.delivery-days-quick-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Delivery day indicators */
.delivery-days-checkbox input:checked + label {
  background-color: #28a745 !important;
  color: white !important;
  border-color: #28a745 !important;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3) !important;
  transform: scale(1.05);
}

.delivery-days-checkbox label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 2px solid #ced4da;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 4px;
  font-weight: 600;
  font-size: 14px;
  position: relative;
  background-color: white;
}

.delivery-days-checkbox label:hover {
  background-color: #e9ecef;
  border-color: #28a745;
  transform: scale(1.05);
}

.delivery-days-checkbox input:checked + label:hover {
  background-color: #218838 !important;
  border-color: #28a745 !important;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4) !important;
}

/* Tooltip for full day names */
.delivery-days-checkbox label::after {
  content: attr(data-full-day);
  position: absolute;
  bottom: -35px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: normal;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.delivery-days-checkbox label::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #333;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.delivery-days-checkbox label:hover::after,
.delivery-days-checkbox label:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Delivery Calendar Preview */
.delivery-calendar-preview {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.delivery-calendar-preview h4 {
  margin-bottom: 1rem;
  color: #2c3e50;
  font-size: 1.2rem;
  text-align: center;
}

.calendar-preview-container {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.preview-delivery-event {
  background-color: #28a746b3 !important;
  border-color: #28a746b3 !important;
  color: white !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  border-radius: 4px !important;
  padding: 2px 6px !important;
}

/* .preview-delivery-event:hover {
  background-color: #218838 !important;
  border-color: #218838 !important;
} */

/* Mobile responsiveness for calendar preview */
@media (max-width: 768px) {
  .delivery-calendar-preview {
    margin-top: 1.5rem;
    padding: 1rem;
  }
  
  .calendar-preview-container {
    padding: 0.5rem;
  }
  
  .preview-delivery-event {
    font-size: 0.75rem !important;
    padding: 1px 4px !important;
  }
}
