/* کانتینر فرم - بهبود یافته */
.wpirani-form-container {
    font-family: inerhit;
    color: #333;
    max-width: 600px;
    margin: 40px auto;
    direction: rtl;
    background: #ffffff;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

.wpirani-form-header {
    background: linear-gradient(135deg, #C30A52, #a30842);
    padding: 12px 30px;
    color: white;
    text-align: center;
}

.wpirani-form-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.wpirani-form-header p {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 16px;
}

.vpn-yadak {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    font-weight: 600;
}
.vpn-yadak svg {
    margin-left: 15px;
    width: 35px;
}

.wpirani-form-container:has(.wpirani-order-details) .vpn-yadak {
    display: none;
}
/* فرم اصلی */
.wpirani-form {
    padding: 30px;
}

.wpirani-form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* سطرهای فرم */
.wpirani-form-row {
    position: relative;
}

.wpirani-form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 15px;
}
.wpirani-form-row:has([data-required="true"]) label::after {
    content: "*";
    color: #ff7f7f;
    width: 15px;
    padding-right: 5px;
}
.wpirani-form-row input,
.wpirani-form-row select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
    outline: none;
    transition: all 0.3s ease;
    background-color: #fff;
    font-family: inherit;
}

.wpirani-form-row input:focus,
.wpirani-form-row select:focus {
    border-color: #C30A52;
    box-shadow: 0 0 0 3px rgba(195, 10, 82, 0.1);
}


textarea#address, textarea#product_name {
    width: 100%;
    line-height: 2em !important;
    overflow: hidden;
}

/* دکمه پرداخت - بهبود یافته */
.wpirani-form-submit {
    margin-top: 10px;
}

.wpirani-payment-button {
    background: linear-gradient(135deg, #C30A52, #a30842);
    color: white;
    padding: 18px 40px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(195, 10, 82, 0.3);
    position: relative;
    overflow: hidden;
}

.wpirani-payment-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.wpirani-payment-button:hover:before {
    transform: translateX(0);
}

.wpirani-payment-button:hover {
    background: linear-gradient(135deg, #a30842, #8a0635);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(195, 10, 82, 0.4);
}

.wpirani-payment-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(195, 10, 82, 0.3);
}

/* Toast Notifications - بهبود یافته */
#wpirani-toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 90%;
  max-width: 400px;
}

.wpirani-toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 20px;
    margin-bottom: 15px;
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    border-right: 5px solid;
    display: flex;
    align-items: flex-start;
    font-weight: 500;
    line-height: 0.8;
    white-space: pre-line;
    flex-direction: column;
}

.wpirani-toast-show {
  transform: translateY(0);
  opacity: 1;
}

.wpirani-toast-success {
  border-right-color: #28a745;
  color: #155724;
}

.wpirani-toast-error {
  border-right-color: #dc3545;
  color: #721c24;
}

.wpirani-toast-warning {
  border-right-color: #ffc107;
  color: #856404;
}
.wpirani-toast .hadaksar {
    line-height: 1.3 !important;
}

/* جزئیات سفارش - بهبود یافته */
.wpirani-order-details {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef);
  border-radius: 16px;
  padding: 30px;
  margin: 30px 0;
  border: 1px solid #dee2e6;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.wpirani-order-details h3 {
  margin-top: 0;
  color: #C30A52;
  border-bottom: 2px solid #C30A52;
  padding-bottom: 15px;
  font-size: 22px;
  font-weight: 700;
}

.wpirani-order-details p {
  margin: 12px 0;
  font-size: 16px;
  display: flex;
  align-items: center;
}

.wpirani-order-details strong {
  display: inline-block;
  width: 160px;
  color: #495057;
  font-weight: 600;
}

/* پیام‌ها */
.wpirani-message-container {
  max-width: 600px;
  margin: 15px auto;
  text-align: center;
}

.wpirani-success-message {
  background-color: #d4edda;
  color: #155724;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 16px;
  border: 1px solid #c3e6cb;
}

.wpirani-error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 16px;
  border: 1px solid #f5c6cb;
}

.wpirani-warning-message {
  background-color: #fff3cd;
  color: #856404;
  padding: 15px 20px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 16px;
  border: 1px solid #ffeeba;
}

/* بهبود responsive */
@media (max-width: 768px) {
  .wpirani-form-container {
    margin: 20px 15px;
  }
  
  .wpirani-form {
    padding: 20px;
  }
  
  .wpirani-form-row input,
  .wpirani-form-row select {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .wpirani-payment-button {
    padding: 16px 30px;
    font-size: 17px;
  }
  
  .wpirani-order-details {
    padding: 20px;
  }
  
  .wpirani-order-details p {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .wpirani-order-details strong {
    width: 100%;
    margin-bottom: 5px;
  }
  
  .wpirani-toast {
    font-size: 14px;
    padding: 15px;
  }
}

/* استایل‌های جدید برای نمایش مبلغ */
.wpirani-total-row {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid #e9ecef;
}

.wpirani-total-container {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.wpirani-total-label {
    color: #495057;
    margin-left: 10px;
}

.wpirani-total-amount {
    color: #C30A52;
    font-size: 24px;
    font-weight: 700;
    min-width: 100px;
    text-align: center;
}

.wpirani-total-currency {
    color: #495057;
    margin-right: 5px;
}

/* بهبود responsive */
@media (max-width: 768px) {
  .wpirani-form-container {
    margin: 20px 15px;
  }
  
  .wpirani-form {
    padding: 20px;
  }
  
  .wpirani-form-row input,
  .wpirani-form-row select {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .wpirani-payment-button {
    padding: 16px 30px;
    font-size: 17px;
  }
  
  .wpirani-order-details {
    padding: 20px;
  }
  
  .wpirani-order-details p {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .wpirani-order-details strong {
    width: 100%;
    margin-bottom: 5px;
  }
  
  .wpirani-toast {
    font-size: 14px;
    padding: 15px;
  }
  
  .wpirani-total-container {
    font-size: 16px;
  }
  
  .wpirani-total-amount {
    font-size: 20px;
  }
}

/* استایل‌های جدید برای نمایش مبلغ پرداخت */
.wpirani-payment-summary {
  background: linear-gradient(145deg, #f8f9fa, #e9ecef);
  border-radius: 12px;
  padding: 20px;
  margin: 25px 0 15px 0;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wpirani-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
}

.wpirani-summary-label {
  color: #495057;
  font-weight: 600;
}

.wpirani-summary-value {
  display: flex;
  align-items: baseline;
}

.wpirani-amount {
  color: #C30A52;
  font-size: 28px;
  font-weight: 700;
  margin-left: 5px;
  transition: all 0.3s ease;
  min-width: 50px;
  text-align: left;
  direction: ltr;
}

.wpirani-currency {
  color: #6c757d;
  font-size: 16px;
  font-weight: 500;
}

/* بهبود responsive */
@media (max-width: 768px) {
  .wpirani-form-container {
    margin: 20px 15px;
  }
  
  .wpirani-form {
    padding: 20px;
  }
  
  .wpirani-form-row input,
  .wpirani-form-row select {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .wpirani-payment-button {
    padding: 16px 30px;
    font-size: 17px;
  }
  
  .wpirani-order-details {
    padding: 20px;
  }
  
  .wpirani-order-details p {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .wpirani-order-details strong {
    width: 100%;
    margin-bottom: 5px;
  }
  
  .wpirani-toast {
    font-size: 14px;
    padding: 15px;
  }
  
  .wpirani-payment-summary {
    padding: 15px;
    margin: 20px 0 10px 0;
  }
  
  .wpirani-summary-row {
    font-size: 16px;
  }
  
  .wpirani-amount {
    font-size: 24px;
  }
  
  .wpirani-currency {
    font-size: 14px;
  }
}

.amount-in-words {
    margin-top: 8px;
    font-size: 14px;
    color: #555;
    text-align: right;
    font-weight: 500;
    padding: 6px 12px;
    background-color: #f0f7ff;
    border-radius: 6px;
    border-right: 3px solid #C30A52;
    transition: all 0.3s ease;
}

.amount-in-words:empty {
    display: none;
}

/* بهبود responsive */
@media (max-width: 768px) {
    .amount-in-words {
        font-size: 13px;
        padding: 5px 10px;
    }
}
.wpirani-form-row select {
    padding: 10px;
}
.wpirani-form-row select#wpirani_city {
    font-size: 1.1em;
}


/* استایل‌های مودال تأیید پرداخت - اصلاح شده */
.wpirani-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    direction: rtl;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wpirani-modal-show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.wpirani-modal-content {
    position: relative;
    background-color: #fff;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.wpirani-modal-show .wpirani-modal-content {
    transform: scale(1);
}

.wpirani-modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #C30A52, #a30842);
    border-radius: 16px 16px 0 0;
}

.wpirani-modal-header h3 {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.wpirani-modal-body {
    padding: 25px 25px 10px 25px;
	text-align: center;
}

.confirm-message {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.confirm-amount {
    color: #C30A52;
    font-size: 22px;
    font-weight: 700;
}

.confirm-note {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 10px;
    text-align: center;
}

.confirm-warning {
    font-size: 14px;
    color: #e74c3c;
    text-align: center;
}

.wpirani-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

#confirm-payment {
    background: #a51a4e;
    color: #fff;
    border: unset;
    padding: 6px 10px;
    border-radius: 12px;
}
#cancel-payment {
    background: #1579c7;
    color: #fff;
    border: unset;
    padding: 6px 10px;
    border-radius: 12px;
}
.wpirani-btn-secondary:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wpirani-btn-secondary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* بهبود responsive */
@media (max-width: 768px) {
    .wpirani-modal-content {
        width: 95%;
    }
    
    .wpirani-modal-header {
        padding: 15px 20px;
    }
    
    .wpirani-modal-header h3 {
        font-size: 18px;
    }
    
    .wpirani-modal-body {
        padding: 20px;
    }
    
    .confirm-message {
        font-size: 16px;
    }
    
    .confirm-amount {
        font-size: 20px;
    }
    
    .confirm-note {
        font-size: 15px;
    }
    
    .confirm-warning {
        font-size: 13px;
    }
    
    .wpirani-btn {
        width: 100%;
    }
}

#bakala-trigger-btn {
	background: #38af3d;
    color: #fff;
    border: unset;
    padding: 6px 10px;
    border-radius: 12px;
    margin-top: 7px;
}