/* Algerian COD Checkout v0.2.0 */
@import url('https://unpkg.com/feather-icons@4.29.0/dist/feather.css');

.acc-checkout-box {
  border: 3px dashed #EBF0F4;
  padding: 1.5rem;
  margin: 2rem 0;
  max-width: 450px;
  width: 100%;
  background: #fcfcfc;
  border-radius: 16px;
  direction: rtl; /* Arabic friendly */
  text-align: right;
  font-family: 'Rubik', sans-serif; /* Default fallback - will be overridden by dynamic CSS */
  display: block;
  float: none;
  clear: both;
  box-sizing: border-box;
}

/* Ensure all form elements inherit the font */
.acc-checkout-box *,
.acc-checkout-box input,
.acc-checkout-box select,
.acc-checkout-box button,
.acc-checkout-box label,
.acc-checkout-box span,
.acc-form-title {
  font-family: inherit !important;
}

/* Input with icons */
.acc-input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px solid #EBF0F4;
  border-radius: 12px;
  background: #fff;
  height: 50px;
  overflow: hidden;
}

.acc-input-with-icon i {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  width: 44px;
  pointer-events: none;
  z-index: 2;
  stroke-width: 1.5;
  padding: 12px;
  background-color: #EBF0F4;
  border-left: 1px solid #0F172A;
  border-radius: 12px 0 0 12px;
}

.acc-input-with-icon input,
.acc-input-with-icon select {
  width: 100%;
  padding: .75rem 15px .75rem 55px;
  border: none !important;
  border-radius: 12px;
  box-sizing: border-box;
  font-family: 'Rubik', sans-serif;
  height: 50px;
  background: transparent;
  color: #0F172A;
  outline: none;
}

.acc-input-with-icon:focus-within {
  border-color: #0F172A;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

/* Variation buttons */
.acc-variation-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.acc-variation-btn {
  padding: 8px 12px;
  border: 2px solid #e3e3e3;
  background: #f8f9fa;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Rubik', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #0F172A;
  transition: all 0.2s ease;
  min-width: 32px;
  text-align: center;
}

.acc-variation-btn:hover {
  border-color: #d1d5db;
  background: #f3f4f6;
}

.acc-variation-btn.selected {
  border-color: #0F172A;
  background: #0F172A;
  color: #fff;
}

.acc-variation-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.1);
}

/* Quantity controls */
.acc-quantity-controls {
  display: flex;
  align-items: center;
  border: 2px solid #EBF0F4;
  border-radius: 12px;
  width: fit-content;
  margin-top: 8px;
  background: #fff;
}

.acc-qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Rubik', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-qty-input {
  width: 50px;
  height: 40px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  border: none;
  background: transparent !important;
  color: #0F172A !important;
  font-family: 'Rubik', sans-serif;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

/* Remove spinner arrows from number input */
.acc-qty-input::-webkit-outer-spin-button,
.acc-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Keep existing styles */
.acc-checkout-box .acc-field { margin-bottom: 1rem; }

.acc-fields-row {
  display: flex;
  flex-direction: column;
}
.acc-fields-row .acc-field {
  width: 100%;
}

/* Regular fields without icons */
.acc-checkout-box input[type=text],
.acc-checkout-box input[type=tel],
.acc-checkout-box input[type=number],
.acc-checkout-box select {
  width: 100%;
  padding: .75rem;
  box-sizing: border-box;
  font-family: 'Rubik', sans-serif;
  height: 50px;
  color: #0F172A;
  background: #fff;
  position: relative;
  border-color: #fff;
}

/* Dropdown arrows for select elements */
.acc-checkout-box select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: 2% 50%;
  background-size: 20px;
  padding-left: 40px;
}

/* Select elements with icons (wilaya field) */
.acc-input-with-icon select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: 2% 50%;
  background-size: 20px;
  padding-left: 40px;
}


/* Label styling */
.acc-checkout-box label,
.acc-field-label { 
  font-size: .9rem; 
  margin-right: .5rem; 
  font-family: 'Rubik', sans-serif;
  color: #0F172A !important;
  font-weight: 500;
}

.acc-color-options label,
.acc-size-options label,
.acc-delivery-option { margin-inline-end: 1rem; white-space: nowrap; }
.acc-total-row { font-size: 1.05rem; margin-top: 1.25rem; font-family: 'Rubik', sans-serif; }
.acc-total-row strong { margin-left: .5rem; }
.acc-submit-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  background: #0F172A;
  color: #fff;
  font-family: 'Rubik', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.btn-text {
  font-weight: 500;
}

.btn-price {
  font-weight: 400;
  font-size: 0.925rem;
}
.acc-response { margin-top: 1rem; font-weight: 600; font-family: 'Rubik', sans-serif; }
.acc-response.error { color: #c00; }
.acc-response.success { color: #090; }
.acc-order-summary {
  margin-top: 1rem;
}

/* Add dividers between summary items */
.acc-summary-item {
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.acc-summary-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.acc-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.acc-summary-item .summary-item-title {
    margin: 0;
    flex: 1;
    font-family: 'Rubik', sans-serif;
    color: #0F172A;
    display: flex;
    align-items: center;
}
.Summary-item-title {
  font-family: 'Rubik', sans-serif;
  color: #0F172A;
} 
.acc-product-price, .acc-shipping-price, .acc-total-price {
  font-family: 'Rubik', sans-serif;
  color: #0F172A;
  font-weight: 500;
}

/* Total amount styling - make it black and font-weight 500 like product price */
.acc-total-estimate {
  font-family: 'Rubik', sans-serif;
  color: #0F172A !important;
  font-weight: 500 !important;
}

/* Order Summary Dropdown Styles */
.acc-order-summary-dropdown {
  margin-top: 1rem;
  border: 2px solid #EBF0F4;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.acc-summary-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  cursor: pointer;
  background: #F8F9FA;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #EBF0F4;
}

.acc-summary-toggle:hover {
  background: #F3F4F6;
}

.acc-summary-toggle-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.acc-summary-toggle-content i {
  color: #0F172A;
  stroke-width: 1.5;
}

.acc-summary-toggle-text {
  font-family: 'Rubik', sans-serif;
  font-weight: 500;
  color: #0F172A;
  font-size: 1rem;
}

.acc-summary-toggle-icon {
  color: #666;
  transition: transform 0.2s ease;
  stroke-width: 1.5;
}

.acc-summary-toggle.open .acc-summary-toggle-icon {
  transform: rotate(180deg);
}

.acc-summary-content {
  padding: 1rem;
  background: #fff;
}

.acc-summary-content .acc-summary-item {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 8px;
  margin-bottom: 8px;
}

.acc-summary-content .acc-summary-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  font-weight: 600;
}

.acc-shipping-options {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Optional: vertically centers content */
    gap: 10px; /* Optional: space between flex children */
}
.acc-delivery-option {
  padding: 16px;
  border-radius: 8px;
  background-color: #F3F4F6;
  color: #0F172A;
}
.acc-delivery-option.selected {
  border: 2px solid #0F172A;
}
.acc-submit-btn {
  margin-bottom: .5rem;
  animation: shake-every-5s 5s infinite;
  position: relative;
  transition: all 0.2s ease;
}

/* Loading state for submit button */
.acc-submit-btn.submitting {
  opacity: 0.7;
  cursor: not-allowed;
  animation: none;
}

.acc-submit-btn.submitting .btn-text {
  position: relative;
}

.acc-submit-btn.submitting .btn-text::after {
  content: '';
  position: absolute;
  right: -25px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* WhatsApp Button Styling */
.acc-whatsapp-row {
  margin-bottom: 1rem;
}

.acc-whatsapp-btn {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  background: #25D366;
  color: #fff;
  font-family: 'Rubik', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
  font-weight: 500;
}

.acc-whatsapp-btn:hover {
  background: #128C7E;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.acc-whatsapp-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.2);
}

.acc-whatsapp-btn i {
  stroke-width: 2;
  width: 20px;
  height: 20px;
}

.acc-whatsapp-btn .btn-text {
  font-weight: 500;
}

/* Shake animation keyframes */
@keyframes shake-every-5s {
  0%, 96%, 100% { transform: translateX(0); }
  97% { transform: translateX(-2px); }
  98% { transform: translateX(2px); }
  99% { transform: translateX(-1px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(10px); }
}
.acc-color-options label, .acc-size-options label, .acc-delivery-option {
      margin-inline-end: 0rem!important;
}
.acc-checkout-box label {
  margin-right: 0px!important;
  width: 50%;
}
.acc-form-title {
  display: block;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.4rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #0F172A;
  font-family: 'Rubik', sans-serif;
}

.acc-variation-btn:hover {
color: #EBF0F4;
}
.acc-input-with-icon {
  padding-right: 12px;
  border-width: 1px;
  border-color: #EBF0F4;
}
.woocommerce-js form .form-row textarea, .woocommerce-js input[type=email], .woocommerce-js input[type=number], .woocommerce-js input[type=password], .woocommerce-js input[type=reset], .woocommerce-js input[type=search], .woocommerce-js input[type=tel], .woocommerce-js input[type=text], .woocommerce-js input[type=url], .woocommerce-js textarea, .woocommerce-page form .form-row textarea, .woocommerce-page input[type=email], .woocommerce-page input[type=number], .woocommerce-page input[type=password], .woocommerce-page input[type=reset], .woocommerce-page input[type=search], .woocommerce-page input[type=tel], .woocommerce-page input[type=text], .woocommerce-page input[type=url], .woocommerce-page textarea {
  background-color: transparent!important;
  .acc-checkout-box input[type=text], .acc-checkout-box input[type=tel], .acc-checkout-box input[type=number], .acc-checkout-box select {
    background-color: transparent!important;
  }
}

/* acc-2nd-div styling (for commune field without icon) */
.acc-2nd-div {
  position: relative;
  display: flex;
  align-items: center;
  border: 2px solid #EBF0F4;
  border-radius: 12px;
  background: #fff;
  height: 50px;
  overflow: hidden;
}

.acc-2nd-div select {
  width: 100%;
  padding: .75rem 15px;
  border: none !important;
  border-radius: 12px;
  box-sizing: border-box;
  font-family: 'Rubik', sans-serif;
  height: 50px;
  background: transparent;
  color: #0F172A;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: 2% 50%;
  background-size: 20px;
  padding-left: 40px;
}

.acc-2nd-div:focus-within {
  border-color: #0F172A;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

/* Remove conflicting styles from regular select focus */
.acc-2nd-div select:focus {
  box-shadow: none !important;
  border: none !important;
}

/* Combined quantity and submit button row */
.acc-quantity-submit-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 1rem;
}

.acc-quantity-submit-row .acc-quantity-controls {
  flex: 0 0 30%;
  display: flex;
  align-items: center;
  border: 2px solid #EBF0F4;
  border-radius: 12px;
  width: fit-content;
  background: #fff;
  margin: 0;
}

.acc-quantity-submit-row .acc-submit-btn {
  flex: auto;
  width: auto;
  padding: 1rem;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  background: #0F172A;
  color: #fff;
  font-family: 'Rubik', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 0;
  animation: shake-every-5s 5s infinite;
}

.acc-quantity-submit-row .acc-qty-btn {
  width: 28px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Rubik', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #0F172A;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acc-quantity-submit-row .acc-qty-input {
  width: 50px;
  height: 40px;
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  border: none;
  background: transparent !important;
  color: #0F172A !important;
  font-family: 'Rubik', sans-serif;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
}

/* Ensure input text is always visible */
.acc-quantity-submit-row .acc-qty-input:focus,
.acc-quantity-submit-row .acc-qty-input:active,
.acc-quantity-submit-row .acc-qty-input:hover {
  color: #0F172A !important;
  background: transparent !important;
}

/* Remove spinner arrows from number input */
.acc-quantity-submit-row .acc-qty-input::-webkit-outer-spin-button,
.acc-quantity-submit-row .acc-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Comprehensive quantity input text visibility override */
input[name="acc_quantity"],
input.acc-qty-input,
.acc-quantity-controls input,
.acc-quantity-submit-row input[type="number"] {
  color: #0F172A !important;
  background: transparent !important;
  text-align: center !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  font-family: 'Rubik', sans-serif !important;
  border: none !important;
  outline: none !important;
  -webkit-text-fill-color: #0F172A !important;
  opacity: 1 !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .acc-quantity-submit-row {
    flex-direction: column;
    gap: 10px;
  }
  
  .acc-quantity-submit-row .acc-quantity-controls,
  .acc-quantity-submit-row .acc-submit-btn {
    flex: none;
    width: 100%;
  }
}

/* Font family inheritance override - ensures dynamic font is applied everywhere */
.acc-checkout-box,
.acc-checkout-box *,
.acc-checkout-box input,
.acc-checkout-box select,
.acc-checkout-box button,
.acc-checkout-box label,
.acc-checkout-box span,
.acc-checkout-box div,
.acc-checkout-box p,
.acc-form-title,
.acc-field-label,
.acc-variation-btn,
.acc-qty-btn,
.acc-qty-input,
.acc-submit-btn,
.acc-delivery-option,
.acc-product-price,
.acc-shipping-price,
.acc-total-estimate,
.acc-response,
.acc-summary-item,
.acc-order-summary-dropdown,
.acc-summary-toggle,
.acc-summary-toggle-text,
.acc-summary-content {
  font-family: inherit !important;
}

/* Remove hardcoded font references from specific elements */
.acc-checkout-box .btn-text,
.acc-checkout-box .btn-price {
  font-family: inherit !important;
}

/* Dynamic color override - ensures settings changes take precedence */
.acc-checkout-box select[style*="background-image"],
.acc-2nd-div select[style*="background-image"],
.acc-input-with-icon select[style*="background-image"] {
  background-image: inherit !important;
}

/* Ensure dynamic icon colors override static ones */
.acc-input-with-icon i[style*="color"] {
  color: inherit !important;
}

/* Comprehensive SVG icon color targeting for Feather icons */
.acc-input-with-icon i svg,
.acc-input-with-icon svg,
.acc-input-with-icon [data-feather],
svg[data-feather] {
  color: inherit !important;
  stroke: currentColor !important;
}

/* Ensure all Feather icons in the form use currentColor */
.acc-checkout-box svg:not(:root),
.acc-checkout-box [data-feather] {
  overflow: hidden;
  color: inherit !important;
  stroke: currentColor !important;
}
.woocommerce-js form .form-row textarea, .woocommerce-js input[type=email], .woocommerce-js input[type=number], .woocommerce-js input[type=password], .woocommerce-js input[type=reset], .woocommerce-js input[type=search], .woocommerce-js input[type=tel], .woocommerce-js input[type=text], .woocommerce-js input[type=url], .woocommerce-js textarea, .woocommerce-page form .form-row textarea, .woocommerce-page input[type=email], .woocommerce-page input[type=number], .woocommerce-page input[type=password], .woocommerce-page input[type=reset], .woocommerce-page input[type=search], .woocommerce-page input[type=tel], .woocommerce-page input[type=text], .woocommerce-page input[type=url], .woocommerce-page textarea {
  background-color: transparent !important;
  float: right;
  text-align: right;
}