/* WooCommerce Address Manager - My Account Styles */

/* Container for address manager in My Account */
.woocommerce-address-manager {
  /* max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  direction: rtl; */
}

/* Header styling */
.woocommerce-address-manager h2 {
  font-size: 1.75em;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 20px;
  text-align: right;
}

/* Add address button */
#add-address-button {
  width: 100%;
  background: var(--btn-accented-bgcolor, var(--wd-primary-color, #83b735));
  color: var(--btn-accented-color, #ffffff);
  padding: 12px 24px;
  border: none;
  border-radius: var(--btn-accented-brd-radius, var(--wd-brd-radius, 6px));
  font-size: 1em;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* margin-bottom: 20px; */
  margin-top: 6px;
}

#add-address-button:hover {
  background: var(--btn-accented-bgcolor-hover, var(--wd-primary-color, #74a32f));
  color: var(--btn-accented-color-hover, #ffffff);
}

#add-address-button:disabled {
  background: #a0aec0;
  cursor: not-allowed;
}

.button.alt {
  background: var(--btn-accented-bgcolor, var(--wd-primary-color, #83b735));
  color: var(--btn-accented-color, #ffffff);
  padding: 10px 20px;
  border: none;
  border-radius: var(--btn-accented-brd-radius, var(--wd-brd-radius, 6px));
  font-size: 0.95em;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.button.alt:hover {
  background: var(--btn-accented-bgcolor-hover, var(--wd-primary-color, #74a32f));
  color: var(--btn-accented-color-hover, #ffffff);
}

.button.alt:disabled {
  background: #a0aec0;
  cursor: not-allowed;
}

.button.cancel {
  background: #6b7280;
}

.button.cancel:hover {
  background: #4b5563;
}

/* Address list */
#address-list-container img {
  display: block;
  margin: 0 auto;
}

#saved-addresses {
  list-style: none;
  padding: 0;
  margin: 0;
}

#saved-addresses li.address-item {
  background: #F9FAFB;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin: 12px 0;
  padding: 16px;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease;
}

#saved-addresses li.address-item .address-checkbox {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: 20px;
  height: 20px;
  border: 1px solid #2563eb;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

#saved-addresses li.address-item .checkbox-inner {
  width: 12px;
  height: 12px;
  display: none;
}

#saved-addresses li.address-item .checkbox-inner.checked {
  display: block;
  border-radius: 2px;
  position: relative;
}

#saved-addresses li.address-item .checkbox-inner.checked::after {
  content: '✔';
  color: #2563eb;
  font-size: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#saved-addresses .address-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#saved-addresses .address-content header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

#saved-addresses .address-content strong {
  font-size: 1.1em;
  font-weight: 600;
  color: #1a1a1a;
}

#saved-addresses .address-details p {
  margin: 4px 0;
  font-size: 0.95em;
  color: #4b5563;
  line-height: 1.5;
}

#saved-addresses .address-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

#saved-addresses .edit-address,
#saved-addresses .delete-address {
  background: #fff;
  color: #2c2c2c;
  padding: 6px;
  border-radius: 6px;
  font-size: 0.85em;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #e0e0e0;
}

#saved-addresses .edit-address:hover {
  background: #f0f5ff;
  border-color: #2563eb;
}

#saved-addresses .delete-address:hover {
  background: #fff5f5;
  border-color: #e53e3e;
}

#saved-addresses .delete-address:disabled {
  background: #a0aec0;
  cursor: not-allowed;
}

#saved-addresses li.empty-message p {
  color: #6b7280;
  font-size: 0.95em;
  font-style: italic;
  margin: 0;
  text-align: center;
}

.button-spinner {
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  margin-left: 8px;
}

.address-actions .button-spinner {
  border: 2px solid #4b5563;
  border-top: 2px solid transparent;
}

div:where(.swal2-container).swal2-center>.swal2-popup,
div:where(.swal2-container).swal2-center>.swal2-popup button {
  border-radius: var(--radius-m);
}




.woocommerce-user-profile {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.woocommerce-MyAccount-navigation ul li {
  margin-bottom: .85rem;
  padding: .7rem;
  background-color: var(--clr-n-50);
  border-radius: 0.6rem;
}

.woocommerce-MyAccount-navigation ul li:last-child {
  margin-bottom: 0;
}

.woocommerce-MyAccount-navigation ul li.is-active {
  background-color: var(--clr-n-600);
}

.woocommerce-MyAccount-navigation ul li.is-active a {
  color: var(--clr-n-50);
}

.woocommerce-MyAccount-navigation ul li a {
  color: var(--clr-n-600);
  padding-right: 30px !important;
}

.woocommerce-MyAccount-navigation,
.woocommerce-MyAccount-content {
  width: 100%;
  background-color: white;
  border: var(--border-light-1);
  padding: 1.2rem;
  border-radius: 0.9rem;
  box-shadow: var(--shadow-s);
}

.woocommerce-MyAccount-content p {
  margin-bottom: 1rem;
}

.woocommerce-MyAccount-content mark {
  background: var(--clr-n-400);
  color: var(--clr-n-50);
  padding: 0.1rem 0.5rem;
  border-radius: 0.5rem;
}

.woocommerce-EditAccountForm {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.woocommerce-EditAccountForm .clear {
  display: none;
}

.woocommerce-EditAccountForm p {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.woocommerce-EditAccountForm p label {
  margin-bottom: 0.4rem;
}

.woocommerce-EditAccountForm p em {
  font-style: normal;
  font-size: 0.9rem;
}

.woocommerce-EditAccountForm fieldset {
  width: 99%;
  padding: 1rem;
  border-radius: 0.7rem;
  border: var(--border-light-1);
  margin-top: 1rem;
  border-top: var(--border-light-1);
  position: relative;
}

.woocommerce-EditAccountForm fieldset::before {
  content: "";
  position: absolute;
  left: 0;
  top: -38px;
  width: 100%;
  height: 1px;
  background: var(--clr-n-100);
}

.woocommerce-EditAccountForm button[type="submit"] {
  font-size: 1.1rem;
}

.woocommerce-user-profile .woocommerce-MyAccount-content {
  width: 100%;
}

.woocommerce-MyAccount-content ul.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  list-style-type: none;
}

.woocommerce-MyAccount-content ul.products .w_short-config {
  display: none;
}

.myaccount-section {
  overflow-x: auto;
}

.woocommerce-orders-table {
  width: 100%;
  text-align: right;
  white-space: nowrap;
  border-spacing: 16px;
}

.woocommerce-orders-table .woocommerce-Price-currencySymbol {
  margin-right: 0.3rem;
}

.woocommerce-Addresses {
  display: flex;
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 1rem;
}

.woocommerce-Addresses>div {
  width: 99%;
}

.woocommerce-orders-table__cell a {
  margin-left: 0.5rem;
}

header.myaccount-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  border-bottom: 1px solid #e7e7e7;
  padding-bottom: 0.5rem;
}

header.myaccount-header a {
  font-size: 1rem;
  font-weight: bold;
}

.woocommerce-MyAccount-navigation ul li.is-active {
  position: relative;
}

.woocommerce-MyAccount-navigation ul li.is-active::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-60%);
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.6 12.7069C10.4125 12.5194 10.3072 12.2651 10.3072 11.9999C10.3072 11.7348 10.4125 11.4804 10.6 11.2929L15.185 6.70692C15.3672 6.51832 15.468 6.26571 15.4657 6.00352C15.4634 5.74132 15.3582 5.49051 15.1728 5.3051C14.9874 5.11969 14.7366 5.01452 14.4744 5.01224C14.2122 5.00997 13.9596 5.11076 13.771 5.29292L9.189 9.87892C8.62659 10.4415 8.31064 11.2044 8.31064 11.9999C8.31064 12.7954 8.62659 13.5583 9.189 14.1209L13.775 18.7069C13.9636 18.8891 14.2162 18.9899 14.4784 18.9876C14.7406 18.9853 14.9914 18.8801 15.1768 18.6947C15.3622 18.5093 15.4674 18.2585 15.4697 17.9963C15.472 17.7341 15.3712 17.4815 15.189 17.2929L10.6 12.7069Z' fill='white'/%3E%3C/svg%3E%0A");
}

.woocommerce-MyAccount-content {
  line-height: 2;
}

.woocommerce-MyAccount-content p {
  margin: 10px 0;
  color: #333;
}

.woocommerce-MyAccount-navigation ul li {
  position: relative;
}

.woocommerce-MyAccount-navigation ul li::after {
  content: '';
  width: 24px;
  height: 24px;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--clr-n-600);
  -webkit-mask-image: url('../icons/profile/arrow-square-left.svg');
  mask-image: url('../icons/profile/arrow-square-left.svg');
  background-size: cover;
}

.woocommerce-MyAccount-navigation ul li.is-active::after {
  background-color: white;
}

.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--favorite-products::after {
  -webkit-mask-image: url('../icons/profile/heart.svg');
  mask-image: url('../icons/profile/heart.svg');
}

.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--orders::after {
  -webkit-mask-image: url('../icons/profile/shopping-cart.svg');
  mask-image: url('../icons/profile/shopping-cart.svg');
}


.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--edit-address::after {
  -webkit-mask-image: url('../icons/profile/location-tick.svg');
  mask-image: url('../icons/profile/location-tick.svg');
}

.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--edit-account::after {
  -webkit-mask-image: url('../icons/profile/user-square.svg');
  mask-image: url('../icons/profile/user-square.svg');
}

.woocommerce-MyAccount-navigation ul li.woocommerce-MyAccount-navigation-link--customer-logout::after {
  -webkit-mask-image: url('../icons/profile/logout.svg');
  mask-image: url('../icons/profile/logout.svg');
}





@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .woocommerce-address-manager {
    padding: 15px;
  }

  #add-address-button {
    width: 100%;
    text-align: center;
  }
}

















/* استایل برای بخش جدول سفارشات ووکامرس */
.woocommerce-MyAccount-content .woocommerce-orders-table {
  direction: rtl;
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
}

/* استایل سرستون‌ها با گوشه‌های گرد در بالا */
.woocommerce-MyAccount-content .woocommerce-orders-table thead th {
  background-color: #F8FAFC;
  color: #374151;
  font-weight: 400;
  padding: 12px;
  text-align: right;
  font-size: 14px;
}

.woocommerce-MyAccount-content .woocommerce-orders-table thead tr:first-child th:first-child {
  border-top-right-radius: 8px;
}

.woocommerce-MyAccount-content .woocommerce-orders-table thead tr:first-child th:last-child {
  border-top-left-radius: 8px;
}

/* استایل سلول‌های بدنه جدول */
.woocommerce-MyAccount-content .woocommerce-orders-table tbody td,
.woocommerce-MyAccount-content .woocommerce-orders-table tbody th {
  padding: 12px;
  font-size: 14px;
  color: #374151;
  font-weight: 400;
  border-bottom: 1px solid #eceff1;
  text-align: right;
}

/* حذف بوردر برای آخرین ردیف */
.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:last-child td,
.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:last-child th {
  border-bottom: none;
}

/* استایل ردیف‌ها با افکت هاور */
.woocommerce-MyAccount-content .woocommerce-orders-table tbody tr:hover {
  background-color: #fafafa;
  transition: background-color 0.2s ease;
}

/* استایل وضعیت‌های مختلف سفارش */
.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-bank-waiting .woocommerce-orders-table__cell-order-status {
  color: #c05621;
  font-weight: 400;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-processing .woocommerce-orders-table__cell-order-status {
  color: #059669;
  font-weight: 400;
}

.woocommerce-MyAccount-content .woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status {
  color: #b91c1c;
  font-weight: 400;
}

/* استایل لینک‌ها */
.woocommerce-MyAccount-content .woocommerce-orders-table a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 400;
}

.woocommerce-MyAccount-content .woocommerce-orders-table a:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* استایل دکمه‌ها */
.woocommerce-MyAccount-content .woocommerce-button.button {
  display: inline-block;
  padding: 0.5rem;
  margin: 0 4px;
  background-color: #6b7280;
  color: #f8fafc;
  border-radius: var(--radius-s);
  font-size: 13px;
  font-weight: 400;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.woocommerce-MyAccount-content .woocommerce-button.button:hover {
  background-color: #4b5563;
  color: #ffffff;
}

/* استایل قیمت */
.woocommerce-MyAccount-content .woocommerce-Price-amount {
  font-weight: 500;
  color: #1f2937;
}

.woocommerce-MyAccount-content .woocommerce-Price-currencySymbol {
  font-size: 12px;
  margin-right: 4px;
}

/* واکنش‌گرایی برای نمایش بهتر در موبایل */
@media (max-width: 767px) {
  .woocommerce-MyAccount-content .woocommerce-orders-table {
    display: block;
  }

  .woocommerce-MyAccount-content .woocommerce-orders-table thead {
    display: none;
  }

  .woocommerce-MyAccount-content .woocommerce-orders-table tbody,
  .woocommerce-MyAccount-content .woocommerce-orders-table tr,
  .woocommerce-MyAccount-content .woocommerce-orders-table td,
  .woocommerce-MyAccount-content .woocommerce-orders-table th {
    display: block;
    width: 100%;
  }

  .woocommerce-MyAccount-content .woocommerce-orders-table tr {
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .woocommerce-MyAccount-content .woocommerce-orders-table tr:last-child {
    border-bottom: none;
  }

  .woocommerce-MyAccount-content .woocommerce-orders-table td,
  .woocommerce-MyAccount-content .woocommerce-orders-table th {
    padding: 8px 12px;
    position: relative;
    text-align: right;
  }

  .woocommerce-MyAccount-content .woocommerce-orders-table td:before,
  .woocommerce-MyAccount-content .woocommerce-orders-table th:before {
    content: attr(data-title) ": ";
    font-weight: 400;
    color: #374151;
    display: inline-block;
    width: 80px;
  }

  .woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .woocommerce-MyAccount-content .woocommerce-button.button {
    width: 100%;
    margin: 4px 0;
  }
}