/*
 Theme Name: Ariamohajer Child
 Template: ariamohajer
 Version: 1.0.0
 Text Domain: ariamohajer-child
*/

/* ==== کارت رسید پرداخت ووکامرس ==== */
body.woocommerce-order-pay .order_details,
body.woocommerce-order-received .order_details {
  width: 30%;
  margin: 32px auto;
  padding: 20px 16px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.05);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  direction: rtl;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --line: #e2e8f0;
  --success: #16a34a;
  --warning: #f59e0b;
  --error: #dc2626;
}

/* پرفراژ بالا و پایین */
body.woocommerce-order-pay .order_details::before,
body.woocommerce-order-pay .order_details::after,
body.woocommerce-order-received .order_details::before,
body.woocommerce-order-received .order_details::after {
  content: "";
  position: absolute;
  left: 0; right: 0; height: 12px;
  background-size: 16px 12px;
  background-repeat: repeat-x;
  pointer-events: none;
}
body.woocommerce-order-pay .order_details::before,
body.woocommerce-order-received .order_details::before {
  top: -1px;
  background-image: radial-gradient(8px 8px at 8px 12px, transparent 8px, white 8.2px);
}
body.woocommerce-order-pay .order_details::after,
body.woocommerce-order-received .order_details::after {
  bottom: -1px;
  background-image: radial-gradient(8px 8px at 8px 0px, transparent 8px, white 8.2px);
}

/* ردیف‌های داخل کارت */
body.woocommerce-order-pay .order_details li,
body.woocommerce-order-received .order_details li {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  border-bottom: 1px dashed var(--line);
  border-left: none;
  padding-bottom: 8px;
  padding-left: 0;
  color: var(--text-muted);
}
body.woocommerce-order-pay .order_details li strong,
body.woocommerce-order-received .order_details li strong {
  font-weight: 700;
  color: var(--text-main);
  font-size: 15px;
}
body.woocommerce-order-pay .order_details li:last-child,
body.woocommerce-order-received .order_details li:last-child {
  border-bottom: none;
}

/* برجسته کردن مبلغ */
body.woocommerce-order-pay .order_details li.total strong,
body.woocommerce-order-received .order_details li.total strong {
  font-size: 20px;
  color: var(--success);
}

/* وضعیت پرداخت رنگی */
body.woocommerce-order-pay .order_details li.status strong,
body.woocommerce-order-received .order_details li.status strong {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    background: #fcb813;
}

body.woocommerce-order-pay .order_details li.status strong:contains("پرداخت شده"),
body.woocommerce-order-received .order_details li.status strong:contains("پرداخت شده") {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
body.woocommerce-order-pay .order_details li.status strong:contains("در انتظار پرداخت"),
body.woocommerce-order-received .order_details li.status strong:contains("در انتظار پرداخت") {
  background: #fef9c3;
  color: #92400e;
  border: 1px solid #fde68a;
}
body.woocommerce-order-pay .order_details li.status strong:contains("ناموفق"),
body.woocommerce-order-received .order_details li.status strong:contains("ناموفق") {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ترتیب آیتم‌ها (شماره → تاریخ → مبلغ → روش → وضعیت) */
body.woocommerce-order-pay .order_details li.order,
body.woocommerce-order-received .order_details li.order { order: 1; }
body.woocommerce-order-pay .order_details li.date,
body.woocommerce-order-received .order_details li.date { order: 2; }
body.woocommerce-order-pay .order_details li.total,
body.woocommerce-order-received .order_details li.total { order: 3; }
body.woocommerce-order-pay .order_details li.method,
body.woocommerce-order-received .order_details li.method { order: 4; }
body.woocommerce-order-pay .order_details li.status,
body.woocommerce-order-received .order_details li.status { order: 5; }

/* موبایل ریسپانسیو */
@media (max-width: 768px) {
  body.woocommerce-order-pay .order_details,
  body.woocommerce-order-received .order_details {
    width: 92%;
    padding: 18px 12px;
  }
  body.woocommerce-order-pay .woocommerce .button:not(.cancel), body.woocommerce-order-received .woocommerce .button:not(.cancel){
    margin-left: 5px;
    margin-top: 0px;
    }
    body.woocommerce-order-pay .woocommerce form, body.woocommerce-order-received .woocommerce form {
        text-align: center;
        width: 92%;
        padding: 18px 12px;
        display: flex;
        margin: 32px auto;
    }
    body.woocommerce-order-pay .woocommerce .button.cancel, body.woocommerce-order-received .woocommerce .button.cancel {
    margin-right: 5px;
    margin-top: 0px;
}
}

/* استایل عمومی همه دکمه‌ها */
body.woocommerce-order-pay .woocommerce input[type="submit"],
body.woocommerce-order-pay .woocommerce a.button,
body.woocommerce-order-pay .woocommerce button.button,
body.woocommerce-order-pay .woocommerce .button,
body.woocommerce-order-received .woocommerce input[type="submit"],
body.woocommerce-order-received .woocommerce a.button,
body.woocommerce-order-received .woocommerce button.button,
body.woocommerce-order-received .woocommerce .button {
  display: inline-block;
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  text-align: center;
}

/* 🎯 دکمه پرداخت سبز */
body.woocommerce-order-pay .woocommerce .button:not(.cancel),
body.woocommerce-order-received .woocommerce .button:not(.cancel) {
  background: #22c55e;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(34,197,94,0.25);
}
body.woocommerce-order-pay .woocommerce .button:not(.cancel):hover,
body.woocommerce-order-received .woocommerce .button:not(.cancel):hover {
  background: #16a34a;
  box-shadow: 0 10px 24px rgba(22,163,74,0.3);
}

/* 🚫 دکمه بازگشت (cancel) خاکستری */
body.woocommerce-order-pay .woocommerce .button.cancel,
body.woocommerce-order-received .woocommerce .button.cancel {
  background: #f3f4f6;
  color: #1f2937 !important;
  box-shadow: none;
  border: 1px solid #d1d5db;
}
body.woocommerce-order-pay .woocommerce .button.cancel:hover,
body.woocommerce-order-received .woocommerce .button.cancel:hover {
  background: #e5e7eb;
  color: #111827 !important;
}

/* فرم وسط‌چین */
body.woocommerce-order-pay .woocommerce form,
body.woocommerce-order-received .woocommerce form {
  text-align: center;
}

/* حذف ظاهر پیش‌فرض submit */
body.woocommerce-order-pay .woocommerce input[type="submit"],
body.woocommerce-order-received .woocommerce input[type="submit"] {
  appearance: none;
  -webkit-appearance: none;
}

/* ریسپانسیو */
@media (max-width: 600px){
  body.woocommerce-order-pay .woocommerce .button,
  body.woocommerce-order-received .woocommerce .button {
    width: 100%;
    padding: 14px;
    font-size: 15px;
  }
}

/* استایل پیام‌های ووکامرس (خطا، موفقیت، هشدار) */
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info {
  background-color: #f9fafb;
  border: 1px solid #e5e7eb;
  border-right: 4px solid #f43f5e; /* قرمز برای خطا */
  padding: 16px 20px;
  margin: 20px auto;
  width: 80%;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  color: #111827;
  font-size: 15px;
  line-height: 1.8;
  direction: rtl;
  position: relative;
}

/* آیکون خطا در ابتدا */
.woocommerce .woocommerce-error::before {
    content: "⚠️";
    font-size: 18px;
    position: absolute;
    top: 20px;
    left: 20px;
    right: auto;
}

/* رنگ مرز متفاوت برای هر نوع پیام */
.woocommerce .woocommerce-message {
  border-right-color: #22c55e; /* سبز برای موفق */
}

.woocommerce .woocommerce-info {
  border-right-color: #3b82f6; /* آبی برای اطلاع‌رسانی */
}
.woocommerce-info::before {
    color: #1e85be;
    left: 20px;
    right: auto;
}
/* واکنش‌گرا برای موبایل */
@media (max-width: 600px) {
  .woocommerce .woocommerce-message,
  .woocommerce .woocommerce-error,
  .woocommerce .woocommerce-info {
    width: 95%;
    font-size: 14px;
    padding: 14px;
  }
}

/* کانتینر فرم ورود */
.woocommerce form.login {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 40px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.03);
  width: 80%;
  margin-left: auto;
  margin-right: auto;
  direction: rtl;
  font-size: 15px;
  color: #1f2937;
}

/* ورودی‌ها */
.woocommerce form.login input.input-text {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

/* دکمه ورود */
.woocommerce form.login button.button {
  background-color: #2563eb;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.woocommerce form.login button.button:hover {
  background-color: #1d4ed8;
}

/* لینک فراموشی رمز */
.woocommerce form.login .lost_password a {
  color: #2563eb;
  text-decoration: none;
  font-size: 13px;
}

.woocommerce form.login .lost_password a:hover {
  text-decoration: underline;
}

/* چک‌باکس مرا به خاطر بسپار */
.woocommerce form.login .woocommerce-form__label-for-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 12px;
}

.woocommerce form.login input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

/* ریسپانسیو */
@media (max-width: 600px) {
  .woocommerce form.login {
    width: 95%;
    padding: 20px;
    font-size: 14px;
  }
}
