/* استایل‌های مودال */
.nias-login-fastsell-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}
label.nias-login-fastsell-payment-method-option {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
}
.nias-login-fastsell-payment-box {
    width: 100%;
}
.nias-login-fastsell-installment-notice {
    background-color: #ff000012;
    color: red;
    padding: 10px;
    border: 1px solid red;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
@media only screen and (max-width:560px){
    .nias-login-fastsell-installment-notice {
  justify-content: center;
}
}

a.nias-login-fastsell-login-button {
    text-decoration: none;
    color: white;
    background-color: red;
    padding: 5px 15px;
    border-radius: 5px;
}
.nias-login-fastsell-payment-methods img {
    aspect-ratio: 1/1;
    object-fit: contain;
    max-width: 40px;
}
.nias-login-fastsell-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.nias-login-fastsell-modal-content {
  position: relative;
  background: #fff;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 2;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border-radius: 0 0 12px 12px;
  padding: 0 20px 20px 20px;
}

.nias-login-fastsell-modal-close {
  position: absolute;
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  padding: 19px;
  background-color: white;
  line-height: 0;
  border-radius: 50%;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #999;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s;
  z-index: 10;
}

.nias-login-fastsell-modal-close:hover {
  color: #333;
}

body.nias-login-fastsell-modal-open {
  overflow: hidden;
}

/* استپ‌ها */
.nias-login-fastsell-steps {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  gap: 20px;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-around;
}
.nias-login-fastsell-modal-content-close > svg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.nias-login-fastsell-modal-content-close {
  height: 35px;
  overflow: hidden;
  top: -34px;
  transform: translateX(20px);
  width: auto;
  position: relative;
  width: calc(100% + 40px);
  border-radius: 30px 30px 0 0;
}

.nias-login-fastsell-modal-content {
  overflow: visible;
}
.nias-login-fastsell-steps .nias-login-fastsell-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 25px;
  background: #f5f5f5;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  width: -webkit-fill-available;
}

.nias-login-fastsell-steps .nias-login-fastsell-step:hover {
  background: #e8e8e8;
}

.nias-login-fastsell-steps .nias-login-fastsell-step.active {
  background: #0066cc;
  color: #fff;
}
.nias-login-fastsell-cart-items {
  max-height: 40vh;
  overflow-y: scroll;
}
div#nias-login-fastsell-checkout-container {
  max-height: 50vh;
  overflow-y: scroll;
}

/* Firefox */
.nias-login-fastsell-cart-items,
#nias-login-fastsell-checkout-container {
  scrollbar-width: thin;
  scrollbar-color: #b5b5b5 #f1f1f1;
}

/* Chrome, Edge, Safari */
.nias-login-fastsell-cart-items::-webkit-scrollbar,
#nias-login-fastsell-checkout-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.nias-login-fastsell-cart-items::-webkit-scrollbar-track,
#nias-login-fastsell-checkout-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.nias-login-fastsell-cart-items::-webkit-scrollbar-thumb,
#nias-login-fastsell-checkout-container::-webkit-scrollbar-thumb {
  background-color: #b5b5b5;
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

.nias-login-fastsell-cart-items::-webkit-scrollbar-thumb:hover,
#nias-login-fastsell-checkout-container::-webkit-scrollbar-thumb:hover {
  background-color: #8e8e8e;
}
.nias-login-fastsell-step-content .woocommerce-billing-fields *,
.nias-login-fastsell-step-content .woocommerce-additional-fields * {
  max-width: -webkit-fill-available;
  width: 100%;
}

.nias-login-fastsell-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  position: absolute;
  top: 10px;
  left: 10px;
}
.nias-login-fastsell-step.active path {
  stroke: white;
}
button#nias-login-fastsell-apply-coupon,
input#nias-login-fastsell-coupon-code,
button.nias-login-fastsell-btn-next , .nias-login-fastsell-actions button , #nias-login-fastsell-checkout-container *{
  font-family: inherit;
}
.nias-login-fastsell-steps
  .nias-login-fastsell-step.active
  .nias-login-fastsell-step-number {
  background: #fff;
  color: #0066cc;
}

/* محتوای سبد خرید */
.nias-login-fastsell-cart-items {
  margin-bottom: 20px;
}

.nias-login-fastsell-cart-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 15px;
  position: relative;
}

.nias-login-fastsell-cart-item .nias-login-fastsell-item-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.nias-login-fastsell-cart-item .nias-login-fastsell-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.nias-login-fastsell-cart-item .nias-login-fastsell-item-details {
  flex: 1;
  margin-top: 15px;
}
button.nias-login-fastsell-qty-plus {
  border-radius: 20px 0 0 20px;
}
button.nias-login-fastsell-qty-minus {
  border-radius: 0 20px 20px 0;
}

.nias-login-fastsell-cart-item h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
}

.nias-login-fastsell-item-price {
  color: #0066cc;
  font-weight: bold;
  margin-bottom: 8px;
  float: right;
}

.nias-login-fastsell-item-quantity {
  display: flex;
  align-items: center;
  gap: 0px;
  justify-content: flex-end;
}

.nias-login-fastsell-item-quantity button {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background: #f9f9f9;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s;
  min-height: -webkit-fill-available;
}

.nias-login-fastsell-item-quantity button:hover {
  background: #0066cc;
  color: #fff;
  border-color: #0066cc;
}

.nias-login-fastsell-qty-input {
  width: 50px;
  text-align: center;
  border: 1px solid #ddd;
  height: 30px;
  font-size: 14px;
}

.nias-login-fastsell-item-subtotal {
  font-weight: bold;
  font-size: 18px;
  color: #333;
  width: 100%;
}

.nias-login-fastsell-remove-item {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff4444;
  color: #fff;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.3s;
}

.nias-login-fastsell-remove-item:hover {
  background: #cc0000;
}

/* جمع کل */
.nias-login-fastsell-cart-totals {
  padding: 10px;
  background: #f9f9f9;
  border-radius: 8px;
  margin-bottom: 20px;
}

.nias-login-fastsell-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
}

.nias-login-fastsell-total-row.total {
  font-size: 18px;
  font-weight: bold;
  border-top: 2px solid #ddd;
  padding-top: 10px;
  margin-top: 10px;
}

.nias-login-fastsell-total-row.discount {
  color: #28a745;
}

/* کد تخفیف */
.nias-login-fastsell-coupon {
  display: flex;
  float: right;
  max-width: 45%;
}

.nias-login-fastsell-coupon input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  min-width: 0;
  box-sizing: border-box;
}

.nias-login-fastsell-coupon button {
  border: none;
  border-radius: 6px 0 0 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  color: #0066cc;
  background-color: #0066cc2b;
  border: 1px solid #0066cc47;
  padding: 8px 15px;
  flex-shrink: 0;
}

.nias-login-fastsell-coupon button:hover {
  background: #0066cc2b;
}

/* فرم تسویه حساب */
.nias-login-fastsell-checkout-fields {
  margin-bottom: 20px;
}
.nias-login-fastsell-checkout-fields .woocommerce-form-coupon-toggle {
  display: none;
}
.nias-login-fastsell-checkout-fields .nias-login-fastsell-payment-methods-title,
.nias-login-fastsell-checkout-fields .nias-login-fastsell-billing-fields-title,
.nias-login-fastsell-checkout-fields .nias-login-fastsell-shipping-methods-title,
.nias-login-fastsell-checkout-fields .nias-login-fastsell-ship-to-different-address-title {
  margin:0 0 10px 0;
  font-size: 20px;
  color: #333;
  font-weight: 600;
  width: 100%;
  display: block;
}

.nias-login-fastsell-checkout-fields .form-row {
  margin: 0;
}
p#billing_first_name_field , p#billing_last_name_field {
  max-width: calc(50% - 10px);
}


div#nias-login-fastsell-checkout-container , .woocommerce-billing-fields {
  display:flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.nias-login-fastsell-checkout-fields label {
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.nias-login-fastsell-checkout-fields input[type="text"],
.nias-login-fastsell-checkout-fields input[type="email"],
.nias-login-fastsell-checkout-fields input[type="tel"],
.nias-login-fastsell-checkout-fields input[type="number"],
.nias-login-fastsell-checkout-fields select,
.nias-login-fastsell-checkout-fields textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.nias-login-fastsell-checkout-fields input:focus,
.nias-login-fastsell-checkout-fields select:focus,
.nias-login-fastsell-checkout-fields textarea:focus {
  outline: none;
  border-color: #0066cc;
}

.nias-login-fastsell-checkout-fields textarea {
  min-height: 80px;
  resize: vertical;
}

/* روش‌های حمل و نقل و پرداخت */
.nias-login-fastsell-shipping-methods,
.nias-login-fastsell-payment-methods {
  margin-top: 20px;
  padding: 10px;
  background: #f9f9f9;
  border-radius: 8px;
}

.nias-login-fastsell-shipping-method-option,
.nias-login-fastsell-payment-method-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.nias-login-fastsell-shipping-method-option:hover,
.nias-login-fastsell-payment-method-option:hover {
  border-color: #0066cc;
}

.nias-login-fastsell-shipping-method-option input[type="radio"],
.nias-login-fastsell-payment-method-option input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.nias-login-fastsell-shipping-method-option input[type="radio"]:checked,
.nias-login-fastsell-payment-method-option input[type="radio"]:checked {
  accent-color: #0066cc;
}

.nias-login-fastsell-shipping-method-option span:first-of-type,
.nias-login-fastsell-payment-method-option span:first-of-type {
  flex: 1;
  font-weight: 600;
}

.nias-login-fastsell-method-cost {
  color: #0066cc;
  font-weight: bold;
}
.nias-login-fastsell-payment-box p {
  margin: 0;
  font-weight: normal;
  text-align: justify;
}
.nias-login-fastsell-payment-box {
  margin-top: 10px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 6px;
}
.nias-login-fastsell-payment-notice {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
}
.nias-login-fastsell-payment-warning {
  border: 1px solid #dc3545;
  background: rgba(220, 53, 69, 0.08);
  color: #dc3545;
}
.nias-login-fastsell-login-btn {
  padding: 6px 12px;
  border-radius: 6px;
  color: #dc3545;
  border: 1px solid #dc3545;
  background: rgba(220, 53, 69, 0.12);
  text-decoration: none;
  font-weight: 600;
}
.nias-login-fastsell-login-btn:hover {
  background: rgba(220, 53, 69, 0.2);
}

.nias-login-fastsell-ship-to-different-address {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.nias-login-fastsell-ship-to-different-address input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* دکمه‌ها */
.nias-login-fastsell-btn-next,
.nias-login-fastsell-btn-submit {
  width: 100%;
  padding: 12px;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}
button.nias-login-fastsell-btn-next {
  float: left;
  max-width: 50%;
}
.nias-login-fastsell-btn-next:hover,
.nias-login-fastsell-btn-submit:hover {
  background: #0052a3;
}

.nias-login-fastsell-btn-submit:disabled {
  background: #9bb8d6;
  cursor: not-allowed;
  opacity: 0.7;
}

.nias-login-fastsell-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.nias-login-fastsell-btn-back {
  flex: 1;
  padding: 14px;
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
}

.nias-login-fastsell-btn-back:hover {
  background: #5a6268;
}

.nias-login-fastsell-btn-submit {
  flex: 2;
}

/* لودینگ */
.nias-login-fastsell-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  z-index: 10;
}

.nias-login-fastsell-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0066cc;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ریسپانسیو */
@media (max-width: 768px) {
  div#nias-login-fastsell-modal {
    align-items: end;
  }

  .nias-login-fastsell-modal-content {
    border-radius: 0;
  }

  .nias-login-fastsell-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .nias-login-fastsell-cart-item {
    flex-wrap: wrap;
  }

  .nias-login-fastsell-cart-item .nias-login-fastsell-item-image {
    width: 60px;
    height: 60px;
  }

  .nias-login-fastsell-item-subtotal {
    width: 100%;
    text-align: left;
    margin-top: 10px;
  }
}
