/**
 * PowerfulWP – Order Delivery Scheduler for WooCommerce - Public Styles
 */

/* Delivery Fields Styling */
.podsfw-delivery-fields {
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.podsfw-delivery-fields h3 {
  margin: 0 0 15px 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.podsfw-field-group {
  margin-bottom: 15px;
}

.podsfw-field-group label,
.podsfwb-field-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.podsfw-field-group input[type="date"],
.podsfw-field-group select,
.podsfwb-field-group .podsfwb-date-input,
.podsfwb-field-group .podsfwb-time-select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

 

.podsfw-field-group input[type="date"].error,
.podsfw-field-group select.error {
  border-color: #dc3232;
  box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

.podsfw-field-group input[type="date"]:disabled,
.podsfw-field-group select:disabled {
  background: #f5f5f5;
  color: #999;
  cursor: not-allowed;
}

/* Error Messages */
.podsfw-error {
  color: #dc3232;
  font-size: 12px;
  margin-top: 5px;
  padding: 5px 8px;
  background: #fef7f7;
  border-left: 3px solid #dc3232;
  border-radius: 3px;
}

/* Fee Display */
.podsfw-fee-display {
  margin-top: 15px;
  padding: 12px 15px;
  background: #e8f5e8;
  border: 1px solid #c3e6c3;
  border-radius: 6px;
  font-size: 14px;
  color: #2d5a2d;
}

.podsfw-fee-display strong {
  color: #1a4a1a;
}

.podsfw-fee-amount {
  margin-left: 5px;
  font-weight: 600;
}

/* Loading States */
.podsfw-loading {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
}


}

.podsfw-loading::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-top: 2px solid #007cba;
  border-radius: 50%;
  animation: podsfw-spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes podsfw-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Required Field Indicators */
.podsfw-field-group label .required {
  color: #dc3232;
  margin-left: 3px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .podsfw-delivery-fields {
    padding: 12px;
    margin-bottom: 15px;
  }

  .podsfw-field-group input[type="date"],
  .podsfw-field-group select {
    padding: 8px 10px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* WooCommerce Integration */
.woocommerce-checkout .podsfw-delivery-fields {
  margin-top: 20px;
}

.woocommerce-checkout .podsfw-field-group {
  margin-bottom: 20px;
}

/* Blocks Checkout Specific Styles */
 
 
 

 

.wc-block-checkout .podsfw-field-group input.error,
.wc-block-checkout .podsfw-field-group select.error {
  border-color: #dc3232;
}

.wc-block-checkout .podsfw-error {
  color: #dc3232;
  font-size: 12px;
  margin-top: 5px;
}

.wc-block-checkout .podsfw-loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

.wc-block-checkout .podsfw-fee-display {
  margin-top: 15px;
  padding: 10px;
  background: #f8f8f8;
  border-radius: 4px;
  font-size: 14px;
}

.wc-block-checkout .podsfw-fee-amount {
  margin-left: 5px;
}

.wc-block-checkout .required {
  color: #dc3232;
}

 

 

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .podsfw-delivery-fields {
    background: #2d3748;
    border-color: #4a5568;
  }

  .podsfw-delivery-fields h3 {
    color: #e2e8f0;
  }

  .podsfw-field-group label {
    color: #e2e8f0;
  }

  .podsfw-field-group input[type="date"],
  .podsfw-field-group select {
    background: #4a5568;
    border-color: #718096;
    color: #e2e8f0;
  }

  .podsfw-field-group input[type="date"]:focus,
  .podsfw-field-group select:focus {
    border-color: #63b3ed;
    box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.1);
  }

  .podsfw-fee-display {
    background: #2f855a;
    border-color: #48bb78;
    color: #c6f6d5;
  }

  .podsfw-fee-display strong {
    color: #9ae6b4;
  }
}

/* Add these styles for disabled time slot field */
.podsfw-disabled {
  opacity: 0.6;
  cursor: not-allowed !important;
  background-color: #f5f5f5 !important;
}

.podsfw-disabled option {
  color: #999;
}

/* Visual indicator for disabled state */
.podsfw-disabled::before {
  content: "⚠️ ";
  margin-right: 5px;
}

/* Enhanced disabled state styling */
select.podsfw-disabled {
  pointer-events: none;
  border-color: #ddd !important;
  color: #999 !important;
}

select.podsfw-disabled:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Customer-Facing Delivery Information Display */
.woocommerce-order-delivery-info {
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
}

.woocommerce-order-delivery-info h2 {
  margin: 0 0 15px 0;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #007cba;
  padding-bottom: 8px;
}

.woocommerce-order-delivery-info .delivery_info {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.woocommerce-order-delivery-info .delivery_info th,
.woocommerce-order-delivery-info .delivery_info td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

.woocommerce-order-delivery-info .delivery_info th {
  background: #f1f3f4;
  font-weight: 600;
  color: #333;
  width: 40%;
}

.woocommerce-order-delivery-info .delivery_info td {
  background: #fff;
  color: #333;
  font-weight: 500;
}

.woocommerce-order-delivery-info .delivery_info tr:last-child th,
.woocommerce-order-delivery-info .delivery_info tr:last-child td {
  border-bottom: none;
}

/* Email-specific styles */
.woocommerce-order-delivery-info .td {
  padding: 12px 15px !important;
  text-align: left !important;
  vertical-align: middle !important;
  border: 1px solid #eee !important;
  font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif !important;
  word-wrap: break-word !important;
}

.woocommerce-order-delivery-info .td strong {
  color: #333 !important;
  font-weight: 600 !important;
}

/* Responsive design */
@media (max-width: 768px) {
  .woocommerce-order-delivery-info {
    padding: 15px;
    margin: 15px 0;
  }

  .woocommerce-order-delivery-info .delivery_info th,
  .woocommerce-order-delivery-info .delivery_info td {
    padding: 8px 10px;
    font-size: 14px;
  }

  .woocommerce-order-delivery-info .delivery_info th {
    width: 35%;
  }
}

@media (max-width: 480px) {
  .woocommerce-order-delivery-info .delivery_info {
    font-size: 13px;
  }

  .woocommerce-order-delivery-info .delivery_info th,
  .woocommerce-order-delivery-info .delivery_info td {
    padding: 6px 8px;
  }
}

/* Simple PODSFW Debug Information Toggle */
.podsfw-debug-toggle {
  margin: 15px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.podsfw-debug-header {
  background: #f8f9fa;
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #ddd;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.podsfw-debug-header:hover {
  background: #e9ecef;
}

.podsfw-debug-header .dashicons {
  transition: transform 0.2s ease;
}

.podsfw-debug-toggle.collapsed .podsfw-debug-header .dashicons {
  transform: rotate(-90deg);
}

.podsfw-debug-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: white;
}

.podsfw-debug-toggle:not(.collapsed) .podsfw-debug-content {
  max-height: 2000px;
  padding: 15px;
}

.podsfw-date-wrapper { position: relative; display: block; width: 100%; }
.podsfw-calendar-icon-simple { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: auto; color: #666; font-size: 16px; z-index: 10; cursor: pointer; user-select: none; }
.podsfw-calendar-icon-simple:hover { color: #007cba; transform: translateY(-50%) scale(1.1); }
.podsfw-date-input { padding-right: 30px !important; width: 100% !important; box-sizing: border-box !important; }

/* RTL Support - Move calendar icon to left */
html[dir="rtl"] .podsfw-calendar-icon-simple,
body.rtl .podsfw-calendar-icon-simple {
  right: auto;
  left: 8px;
}

html[dir="rtl"] .podsfw-date-input,
body.rtl .podsfw-date-input {
  padding-right: 8px !important;
  padding-left: 30px !important;
}

.podsfw-disabled { pointer-events: none; opacity: 0.7; cursor: not-allowed; }
.podsfw-error { color: #dc3232; font-size: 12px; margin-top: 5px; }
.podsfw-warning { color: #f39c12; font-size: 12px; margin-top: 5px; }
.podsfw-fee-display { background: #f8f8f8; border-radius: 4px; padding: 10px; margin-top: 10px; }
.podsfw-fee-display strong { display: block; margin-bottom: 5px; }
.podsfw-fee-display span { font-size: 1.2em; font-weight: bold; }
.podsfw-test-config { background: #007cba; color: white; border: none; padding: 5px 10px; margin: 5px 0; border-radius: 3px; cursor: pointer; }
.podsfw-test-config:hover { background: #0056b3; }
