/* Force plugin styles to take priority */
body .wpbp-booking-form,
.wpbp-booking-form {
  max-width: 600px !important;
  margin: 20px auto !important;
  padding: 20px !important;
  border: 1px solid #ddd !important;
  border-radius: 8px !important;
  background: #fff !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  box-sizing: border-box !important;
}

.wpbp-booking-form * {
  box-sizing: border-box !important;
}

/* Multi-step progress */
.wpbp-step-progress {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 30px !important;
  padding: 20px 0 !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

.wpbp-step {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  position: relative !important;
  flex: 1 !important;
  max-width: 200px !important;
}

.wpbp-step .step-number {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: #e0e0e0 !important;
  color: #999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: bold !important;
  font-size: 16px !important;
  margin-bottom: 8px !important;
  position: relative !important;
  z-index: 2 !important;
  transition: all 0.3s ease !important;
}

.wpbp-step.active .step-number {
  background: #0073aa !important;
  color: white !important;
}

.wpbp-form-step {
  display: none !important;
}

.wpbp-form-step.active {
  display: block !important;
}

/* Calendar styles */
.wpbp-calendar-widget {
  background: #fff !important;
  border: 2px solid #e0e0e0 !important;
  border-radius: 12px !important;
  padding: 20px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  max-width: 400px !important;
  margin: 0 auto !important;
}

.wpbp-calendar-days {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 2px !important;
}

.wpbp-calendar-day {
  aspect-ratio: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  position: relative !important;
  /* Default styling to prevent flashing */
  background: #f8f9fa !important;
  border: 1px solid #e9ecef !important;
  color: #333 !important;
}

.wpbp-day-available {
  background: #f8f9fa !important;
  color: #333 !important;
  border: 1px solid #e9ecef !important;
}

.wpbp-day-selected {
  background: #0073aa !important;
  color: white !important;
  border-color: #0073aa !important;
  font-weight: 600 !important;
}

.wpbp-day-disabled {
  background: #f5f5f5 !important;
  color: #ccc !important;
  border: 1px solid #e0e0e0 !important;
  cursor: not-allowed !important;
}

.wpbp-day-unavailable {
  background: #fff2f2 !important;
  color: #999 !important;
  border: 1px solid #f0c0c0 !important;
  cursor: not-allowed !important;
}

.wpbp-day-available:hover {
  background: #e3f2fd !important;
  border-color: #0073aa !important;
}

/* Additional Guest Names Styles */
.wpbp-additional-guests {
  margin-top: 25px !important;
  padding: 20px !important;
  background: #f8f9fa !important;
  border-radius: 8px !important;
  border: 1px solid #e9ecef !important;
}

.wpbp-additional-guests h5 {
  margin: 0 0 10px 0 !important;
  color: #333 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
}

.wpbp-guest-info {
  margin: 0 0 15px 0 !important;
  color: #666 !important;
  font-size: 14px !important;
  font-style: italic !important;
}

.wpbp-guest-name-field {
  margin-bottom: 15px !important;
}

.wpbp-guest-name-field label {
  display: block !important;
  margin-bottom: 5px !important;
  font-weight: 500 !important;
  color: #333 !important;
}

.wpbp-guest-name-field input {
  width: 100% !important;
  padding: 10px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  transition: border-color 0.3s ease !important;
  box-sizing: border-box !important;
}

.wpbp-guest-name-field input:focus {
  outline: none !important;
  border-color: #0073aa !important;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1) !important;
}

/* Checkbox Styling Fix */
.wpbp-addon-item input[type='checkbox'] {
  width: 18px !important;
  height: 18px !important;
  margin-right: 12px !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  cursor: pointer !important;
  accent-color: #0073aa !important;
  flex-shrink: 0 !important;
}

/* Guide Dropdown Styling */
.wpbp-guide-dropdown option:disabled {
  color: #999 !important;
  background-color: #f5f5f5 !important;
  font-style: italic !important;
}

.wpbp-guide-dropdown {
  width: 100% !important;
  padding: 10px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  background-color: #fff !important;
  transition: border-color 0.3s ease !important;
}

.wpbp-guide-dropdown:focus {
  outline: none !important;
  border-color: #0073aa !important;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1) !important;
}

/* Loading Spinner */
.wpbp-spinner {
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  border: 2px solid #f3f3f3 !important;
  border-top: 2px solid #0073aa !important;
  border-radius: 50% !important;
  animation: wpbp-spin 1s linear infinite !important;
  margin-right: 8px !important;
  vertical-align: middle !important;
}

@keyframes wpbp-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Larger spinner for PayPal redirect */
.wpbp-paypal-redirect .wpbp-spinner {
  width: 40px !important;
  height: 40px !important;
  border: 4px solid #f3f3f3 !important;
  border-top: 4px solid #0066cc !important;
  margin: 0 auto !important;
  margin-right: 0 !important;
}

/* Coupon Section Styles */
.wpbp-coupon-section {
  background: #f8f9fa !important;
  border: 1px solid #e9ecef !important;
  border-radius: 8px !important;
  padding: 20px !important;
  margin-bottom: 20px !important;
}

.wpbp-coupon-input-group {
  display: flex !important;
  gap: 10px !important;
  align-items: flex-end !important;
  margin-top: 8px !important;
}

.wpbp-coupon-input-group input {
  flex: 1 !important;
  padding: 10px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  transition: border-color 0.3s ease !important;
}

.wpbp-coupon-input-group input:focus {
  outline: none !important;
  border-color: #0073aa !important;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1) !important;
}

.wpbp-coupon-input-group button {
  padding: 10px 20px !important;
  background: #0073aa !important;
  color: white !important;
  border: none !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  transition: background-color 0.3s ease !important;
  white-space: nowrap !important;
}

.wpbp-coupon-input-group button:hover {
  background: #005a87 !important;
}

.wpbp-coupon-input-group button:disabled {
  background: #ccc !important;
  cursor: not-allowed !important;
}

.wpbp-coupon-message {
  margin-top: 10px !important;
  padding: 12px !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
  position: relative !important;
  z-index: 9999 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  animation: wpbp-message-slide-in 0.3s ease-out !important;
}

@keyframes wpbp-message-slide-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wpbp-coupon-message.success {
  background: #d4edda !important;
  color: #155724 !important;
  border: 1px solid #c3e6cb !important;
  border-left: 4px solid #28a745 !important;
}

.wpbp-coupon-message.error {
  background: #f8d7da !important;
  color: #721c24 !important;
  border: 1px solid #f5c6cb !important;
  border-left: 4px solid #dc3545 !important;
}

.wpbp-coupon-applied {
  margin-top: 15px !important;
  padding: 15px !important;
  background: #d4edda !important;
  border: 1px solid #c3e6cb !important;
  border-radius: 6px !important;
}

.coupon-success {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 8px !important;
}

.coupon-success .coupon-icon {
  color: #28a745 !important;
  font-weight: bold !important;
  margin-right: 8px !important;
}

.coupon-success .coupon-text {
  flex: 1 !important;
  color: #155724 !important;
  font-size: 14px !important;
}

.wpbp-remove-coupon {
  background: none !important;
  border: none !important;
  color: #dc3545 !important;
  cursor: pointer !important;
  font-size: 12px !important;
  text-decoration: underline !important;
  padding: 0 !important;
}

.wpbp-remove-coupon:hover {
  color: #c82333 !important;
}

.coupon-discount {
  color: #155724 !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}

/* Ensure coupon applied section is hidden by default */
#wpbp_coupon_applied[style*='display: none'] {
  display: none !important;
}

@media screen and (max-width: 768px) {
  .wpbp-coupon-input-group {
    flex-direction: column !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }
  .wpbp-coupon-input-group button {
    width: 100% !important;
  }
}
