.woocommerce * {
  padding: 0;
  margin: 0;
  box-sizing: border-box !important;
  font-family: var(--e-global-typography-primary-font-family), Sans-serif;
}

svg {
  display: block;
}

.woocommerce::after,
.woocommerce::before {
  display: none !important;
  content: none !important;
}

.woocommerce {
  display: grid;
  grid-template-columns: 311px auto;
  gap: 32px;
  padding: 24px;
  background-color: #f9f9f9;
  border-radius: 32px;
  margin-inline: 64px;
}

/* Navigation */

.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content {
  float: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation {
  position: relative;
  width: 100%;
  height: fit-content;
  background-color: #fff;
  padding: 0;
  margin: 0;
  box-shadow: 0px 2px 20px 0px #4f4f4f1a;
  border-radius: 24px;
}

.navigation-icon {
  position: absolute;
  left: -15px;
  bottom: -15px;
}

.my-account-header {
  display: flex;
  align-items: center;
  background: linear-gradient(227.07deg, #e85d21 0%, #ff9a3d 96.64%);
  color: #ffffff;
  padding: 24px;
  border-radius: 24px 24px 0 0;
}

.my-account-header__avatar img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin-left: 10px;
}

.my-account-header__info {
  display: flex;
  flex-direction: column;
}

.my-account-header__name {
  font-size: 16px;
  font-weight: 600;
  line-height: 32pxa;
}

.my-account-header__email {
  font-size: 14px;
  font-weight: 400;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  padding-block: 24px;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
  text-decoration: none;
  color: #777777;
  font-size: 16px;
  font-weight: 400;
  line-height: 32px;
}

.woocommerce-MyAccount-navigation ul li a {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 8px;
  padding-block: 8px;
  padding-right: 12px;
  transition: all 0.3s ease-in-out;
}

.woocommerce-MyAccount-navigation ul li {
  position: relative;
  overflow: hidden;
  padding-inline: 24px;
}

.woocommerce-MyAccount-navigation ul li.is-active a {
  color: #e15215;
  background-color: #fbefea;
}

.woocommerce-MyAccount-navigation ul li.is-active .arrow-icon {
  left: 12px;
}

.woocommerce-MyAccount-navigation ul li:hover a {
  color: #e15215;
  background-color: #fbefea;
}

.woocommerce-MyAccount-navigation ul li:hover .arrow-icon {
  left: 12px;
}

.arrow-icon {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px;
  background: linear-gradient(227.07deg, #e85d21 0%, #ff9a3d 96.64%);
  border-radius: 6px;
  margin: 0 !important;
  transition: all 0.3s ease-in-out;
}
.woocommerce-MyAccount-navigation ul li .arrow-icon svg {
  stroke: white !important;
  fill: white !important;
}

/* Navigation */

/* My Account */

.woocommerce-MyAccount-content {
  width: 100% !important;
  padding: 24px;
  border-radius: 24px;
  box-shadow: 0px 2px 20px 0px #4f4f4f1a;
  background-color: #fff;
  box-sizing: border-box;
}

.woocommerce-MyAccount-content-title {
  color: #1d1d1d;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

@media screen and (max-width: 500px) {
  .woocommerce-MyAccount-content {
    padding: 12px;
  }
}

/* My Account */

/* Orders */

/* حذف کامل جدول پیش‌فرض ووکامرس */
.woocommerce-account .woocommerce-orders-table {
  display: none !important;
}

/* استایل کانتینر اصلی لیست سفارشات */
.custom-orders-list {
  display: flex;
  flex-direction: column;
  gap: 15px; /* فاصله بین کارت‌ها */
}

/* استایل هر کارت سفارش */
.order-card {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #f5f5f5;
  border-radius: 12px;
  padding: 20px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.order-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* کانتینر برای تمام جزئیات متنی */
.order-card-details-wrapper {
  display: flex;
  flex-grow: 1;
  align-items: center;
}

.order-card-details-wrapper div {
  box-sizing: border-box;
}

/* استایل هر سلول در کارت */
.order-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
  padding: 0 10px;
  gap: 8px;
  flex-shrink: 0;
}

/* استایل عنوان داخل سلول */
.cell-title {
  font-size: 16px;
  color: #777777;
  font-weight: 400;
  text-align: center;
  margin-bottom: 12px;
}

/* استایل محتوای داخل سلول */
.cell-content {
  font-size: 16px;
  color: #2f2f2f;
  font-weight: 500;
  text-align: center;
}

.woocommerce-Price-currencySymbol {
  display: none;
}

/* تنظیم عرض ستون‌ها */
.order-col-1 {
  width: 15%;
} /* سفارش */
.order-col-2 {
  width: 20%;
} /* تاریخ */
.order-col-3 {
  width: 20%;
} /* وضعیت */
.order-col-4 {
  width: 25%;
} /* مجموع */
.order-col-5 {
  width: 20%;
} /* عملیات */

/* استایل‌های خاص برای محتوای هر سلول */
.order-col-4 .cell-content {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  font-weight: normal;
}
.order-col-4 .order-item-count {
  font-size: 16px;
  font-weight: 500;
  color: #2f2f2f;
}

.order-col-5 .cell-content {
  width: 100%;
  text-align: center;
}
.order-col-5 a.button.view {
  background-color: #f7dfd5;
  color: #e66630;
  border: none;
  padding: 8px 38px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.3s ease;
}
.order-col-5 a.button.view:hover {
  background-color: #e57e2c;
  color: #fff;
}

.woocommerce-my-account-no-items-found {
  height: 80%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.my-account-no-items-text {
  color: #777777;
  font-size: 16px;
  list-style: 32px;
  font-weight: 400;
}

@media (max-width: 1400px) {
  .woocommerce {
    grid-template-columns: 270px auto;
    gap: 24px;
    margin-inline: 32px;
  }

  .order-card-details-wrapper {
    flex-wrap: wrap; /* اجازه می‌دهد ستون‌ها به خط بعدی بروند */
    gap: 15px 0; /* فاصله عمودی بین ردیف‌ها */
  }
  .order-col-1,
  .order-col-2,
  .order-col-3 {
    width: 33.33%;
  }
  .order-col-4 {
    width: 50%;
  }
  .order-col-5 {
    width: 50%;
  }
}

/* برای موبایل (عرض کمتر از 768 پیکسل) */
@media (max-width: 1050px) {
  .order-card {
    flex-direction: column; /* چیدمان عمودی کارت */
    padding: 15px;
  }
  .order-card-details-wrapper {
    flex-direction: column; /* چیدمان عمودی ستون‌ها */
    width: 100%;
    align-items: flex-start;
    gap: 0;
  }
  .order-cell {
    width: 100% !important; /* هر ستون تمام عرض را بگیرد */
    flex-direction: row; /* عنوان و محتوا کنار هم */
    justify-content: space-between; /* ایجاد فاصله بین عنوان و محتوا */
    align-items: center;
    padding: 12px 5px;
    border-bottom: 1px solid #f5f5f5;
  }
  .order-card .order-cell:last-child {
    border-bottom: none;
  }
  .cell-title {
    color: #777;
  }
  .order-col-4 .cell-content {
    align-items: flex-end; /* تراز کردن قیمت به سمت چپ */
  }
  .order-col-5 .cell-content {
    text-align: left;
  }
}

@media screen and (max-width: 968px) {
  .woocommerce {
    grid-template-columns: 100%;
    margin-inline: 0;
    background-color: #fff;
  }
  .woocommerce-my-account-no-items-found {
    height: 500px;
  }
}

@media screen and (max-width: 500px) {
  .woocommerce {
    padding: 16px;
  }
}

/* Orders */

/* My Address */

/* حذف استایل‌های پیش‌فرض ووکامرس */
.woocommerce-account .addresses,
.woocommerce-account .woocommerce-Address {
  width: 100%;
  float: none;
  padding: 0;
}
.woocommerce-Address-title,
p:has(+ .u-columns.woocommerce-Addresses) {
  display: none;
}

/* کانتینر اصلی آکاردئون */
.custom-address-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* هر آیتم آکاردئون */
.address-accordion-item {
  background-color: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  transition: all 0.3s ease;
}
.address-accordion-item.is-open {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* هدر آکاردئون (بخش قابل کلیک) */
.address-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  cursor: pointer;
  direction: ltr; /* چیدمان را از چپ به راست می‌کند */
}
.address-title-wrapper {
  display: flex;
  align-items: center;
  gap: 24px;
  direction: rtl; /* محتوای این بخش را راست‌چین می‌کند */
}
.address-title {
  font-size: 18px;
  font-weight: 500;
  color: #5b5b5b;
}

/* دکمه ویرایش/افزودن */

.edit-address-btn {
  height: 36px;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background: linear-gradient(227.07deg, #e85d21 0%, #ff9a3d 96.64%) !important;
  color: #fff !important;
  border: none !important;
  padding: 8px 18px !important;
  border-radius: 6px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color 0.3s ease;
  direction: rtl;
  box-sizing: border-box;
}
.edit-address-btn:hover {
  background-color: #e57e2c !important;
  color: #fff !important;
}
.edit-address-btn svg {
  stroke: currentColor;
}

/* فلش باز و بسته شدن */
.accordion-arrow {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #e66630;
  color: #fff;
  border-radius: 6px;
  padding: 2px;
}
.accordion-arrow svg {
  transition: transform 0.4s ease;
}
.address-accordion-item.is-open .accordion-arrow svg {
  transform: rotate(180deg);
}

/* محتوای آکاردئون (بخش مخفی) */
.address-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  padding: 0 25px;
}
.address-accordion-item.is-open .address-accordion-content {
  padding-bottom: 25px;
}

.no-address-notice {
  padding: 10px 0;
  color: #777;
}

/* استایل سفارشی برای اعلان‌های ووکامرس */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-notice {
  background: linear-gradient(135deg, #E85D21, #FF9A3D) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 12px !important;
  padding: 16px 20px !important;
  margin: 20px 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  box-shadow: 0 4px 12px rgba(232, 93, 33, 0.2) !important;
  position: relative !important;
  overflow: hidden !important;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before,
.woocommerce-notice::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffffff, rgba(255, 255, 255, 0.3));
  border-radius: 12px 12px 0 0;
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a,
.woocommerce-notice a {
  color: #ffffff !important;
  text-decoration: underline !important;
  font-weight: 600 !important;
}

.woocommerce-message a:hover,
.woocommerce-info a:hover,
.woocommerce-error a:hover,
.woocommerce-notice a:hover {
  color: #f0f0f0 !important;
  text-decoration: none !important;
}

/* استایل خاص برای اعلان‌های خطا */
.woocommerce-error {
  background: linear-gradient(135deg, #dc3545, #e74c3c) !important;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2) !important;
}

/* استایل خاص برای اعلان‌های موفقیت */
.woocommerce-message {
  background: linear-gradient(135deg, #28a745, #20c997) !important;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2) !important;
}

/* استایل خاص برای اعلان‌های اطلاعات */
.woocommerce-info {
  background: linear-gradient(135deg, #17a2b8, #20c997) !important;
  box-shadow: 0 4px 12px rgba(23, 162, 184, 0.2) !important;
}

/* چیدمان جزئیات آدرس و نقشه */
.address-details-wrapper {
  display: flex;
  align-items: center;
  padding-top: 27px;
  border-top: 1px solid #f0f0f0;
  gap: 32px;
}
.address-map-placeholder {
  flex-shrink: 0;
}
.address-info-list {
  display: flex;
  flex-direction: column;
  gap: 18px; /* افزایش فاصله بین آیتم‌ها */
}
.info-item {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 500;
  color: #777777;
  font-size: 16px;
}
.info-item svg {
  color: #aaa;
  flex-shrink: 0;
}
.info-item.address-string {
  align-items: flex-start;
  color: #2f2f2f;
}
.info-item.address-string span {
  line-height: 1.7;
}

.address-map-placeholder img {
  border-radius: 8px;
  max-width: 100%;
  border: 1px solid #eee;
}

@media (max-width: 968px) {
  .address-accordion-header {
    padding: 15px;
    flex-direction: column;
    gap: 24px;
  }
  .edit-address-btn {
    align-self: flex-start;
  }
  .address-title-wrapper {
    align-self: flex-end;
  }
  .address-details-wrapper {
    flex-direction: column; /* چیدمان عمودی */
    gap: 25px;
  }
  .address-map-placeholder {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .edit-address-btn,
  .address-title-wrapper {
    align-self: center;
  }
}

/* My Address */

/* Form Edit Address */

/* برای افزایش اولویت، انتخابگرها را با کلاس والد ووکامرس شروع می‌کنیم */
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-edit-address-form
  .form-header {
  margin-bottom: 40px;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-edit-address-form
  .form-header
  h3 {
  font-size: 22px;
  font-weight: 500;
  color: #1d1d1d;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-edit-address-form
  .form-header
  p {
  font-size: 14px;
  font-weight: 400;
  color: #a5a5a5;
  margin-bottom: 24px;
}

/* ساختار گرید دو ستونه برای فیلدها */
.woocommerce-account .woocommerce-MyAccount-content .custom-address-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* دو ستون با عرض برابر */
  gap: 25px; /* فاصله بین فیلدها */
}

/* گروه هر فیلد (شامل لیبل و اینپوت) */
.woocommerce-account .woocommerce-MyAccount-content .form-row-group {
  display: flex;
  flex-direction: column;
}

/* استایل کلی فیلدهای فرم */
/* ایجاد کانتینر برای اینپوت و آیکون */
.custom-edit-address-form .form-row-group.with-icon {
  position: relative;
}

/* استایل و جایگذاری آیکون */
.custom-edit-address-form .form-row-group.with-icon::before {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 10px;
  width: 24px;
  height: 24px;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}
.custom-edit-address-form .form-row-group.with-icon.postcode-icon::before {
  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 opacity='0.4' d='M21 22H3C2.59 22 2.25 21.66 2.25 21.25C2.25 20.84 2.59 20.5 3 20.5H21C21.41 20.5 21.75 20.84 21.75 21.25C21.75 21.66 21.41 22 21 22Z' fill='%23E66630'/%3e%3cpath opacity='0.4' d='M19.0206 3.47991C17.0806 1.53991 15.1806 1.48991 13.1906 3.47991L11.9806 4.68991C11.8806 4.78991 11.8406 4.94991 11.8806 5.08991C12.6406 7.73991 14.7606 9.85991 17.4106 10.6199C17.4506 10.6299 17.4906 10.6399 17.5306 10.6399C17.6406 10.6399 17.7406 10.5999 17.8206 10.5199L19.0206 9.30991C20.0106 8.32991 20.4906 7.37991 20.4906 6.41991C20.5006 5.42991 20.0206 4.46991 19.0206 3.47991Z' fill='%23E66630'/%3e%3cpath d='M15.6103 11.53C15.3203 11.39 15.0403 11.25 14.7703 11.09C14.5503 10.96 14.3403 10.82 14.1303 10.67C13.9603 10.56 13.7603 10.4 13.5703 10.24C13.5503 10.23 13.4803 10.17 13.4003 10.09C13.0703 9.81005 12.7003 9.45005 12.3703 9.05005C12.3403 9.03005 12.2903 8.96005 12.2203 8.87005C12.1203 8.75005 11.9503 8.55005 11.8003 8.32005C11.6803 8.17005 11.5403 7.95005 11.4103 7.73005C11.2503 7.46005 11.1103 7.19005 10.9703 6.91005C10.8303 6.61005 10.7203 6.32005 10.6203 6.05005L4.34032 12.33C4.21032 12.46 4.09032 12.71 4.06032 12.88L3.52032 16.71C3.42032 17.39 3.61032 18.03 4.03032 18.46C4.39032 18.81 4.89032 19 5.43032 19C5.55032 19 5.67032 18.99 5.79032 18.97L9.63032 18.43C9.81032 18.4 10.0603 18.28 10.1803 18.15L16.4603 11.87C16.1803 11.77 15.9103 11.66 15.6103 11.53Z' fill='%23E66630'/%3e%3c/svg%3e");
}
.custom-edit-address-form .form-row-group.with-icon.phone-icon::before {
  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 opacity='0.4' d='M16.19 2H7.81C4.17 2 2 4.17 2 7.81V16.18C2 19.83 4.17 22 7.81 22H16.18C19.82 22 21.99 19.83 21.99 16.19V7.81C22 4.17 19.83 2 16.19 2Z' fill='%23E66630'/%3e%3cpath d='M16 11.25H12.75V8C12.75 7.59 12.41 7.25 12 7.25C11.59 7.25 11.25 7.59 11.25 8V11.25H8C7.59 11.25 7.25 11.59 7.25 12C7.25 12.41 7.59 12.75 8 12.75H11.25V16C11.25 16.41 11.59 16.75 12 16.75C12.41 16.75 12.75 16.41 12.75 16V12.75H16C16.41 12.75 16.75 12.41 16.75 12C16.75 11.59 16.41 11.25 16 11.25Z' fill='%23E66630'/%3e%3c/svg%3e");
}

.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .form-row {
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .form-row
  label {
  font-weight: 500;
  font-size: 14px;
  color: #444;
  margin-bottom: 8px;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .form-row
  .input-text,
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .form-row
  select,
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .select2-container
  .select2-selection--single {
  background-color: #fff !important;
  border: 1px solid #e9ecef !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  width: 100% !important;
  height: 40px !important; /* ارتفاع ثابت برای همه */
  box-shadow: none !important;
  transition: border-color 0.2s ease;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .form-row
  .input-text:focus,
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .form-row
  select:focus,
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .select2-container--open
  .select2-selection--single {
  border-color: #e57e2c !important;
  background-color: #fff !important;
  box-shadow: none !important;
}

/* استایل برای فیلدهای دارای آیکون */
.woocommerce-account .woocommerce-MyAccount-content .form-row-group.with-icon {
  position: relative;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .form-row-group.with-icon
  .form-row {
  width: 100%;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .form-row-group.with-icon
  .input-text {
  text-align: right;
}

/* استایل برای Select2 (فیلدهای استان/شهر) */
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .select2-container
  .select2-selection--single
  .select2-selection__rendered {
  padding-left: 0 !important;
  padding-right: 0 !important;
  color: #495057 !important;
  line-height: 48px !important;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  height: 48px !important;
}

/* تنظیمات عرض فیلدها */
.woocommerce-account
  .woocommerce-MyAccount-content
  .form-row-group.form-row-full {
  grid-column: span 2; /* فیلدهای تمام عرض */
}

.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .select2-container
  .select2-selection--single
  .select2-selection__rendered {
  line-height: normal !important;
  padding: 0 !important;
}

/* استایل دکمه ثبت */
.woocommerce-account .woocommerce-MyAccount-content .form-submit-wrapper {
  text-align: center;
  margin-top: 35px;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .form-submit-wrapper
  .button {
  background-color: #e57e2c !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 14px 40px !important;
  font-size: 16px !important;
  font-weight: bold;
  transition: background-color 0.3s ease;
  cursor: pointer;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .form-submit-wrapper
  .button:hover {
  background-color: #d36c18 !important;
}

.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-address-form-grid
  .form-row
  select {
  width: 1px !important;
}

@media (max-width: 768px) {
  .woocommerce-account
    .woocommerce-MyAccount-content
    .custom-address-form-grid {
    grid-template-columns: 1fr; /* تک ستونه شدن در موبایل */
    gap: 20px;
  }
  .woocommerce-account
    .woocommerce-MyAccount-content
    .form-row-group.form-row-full {
    grid-column: span 1;
  }
}

/* Form Edit Address */

/* Order Downloads */

/* حذف کامل جدول پیش‌فرض ووکامرس */
.woocommerce-account .woocommerce-order-downloads,
.woocommerce-account .woocommerce-table--order-downloads {
  display: none !important;
}

/* استایل کانتینر اصلی لیست دانلودها */
.custom-downloads-list {
  display: flex;
  flex-direction: column;
  gap: 15px; /* فاصله بین کارت‌ها */
}

/* استایل هر کارت دانلود */
.download-card {
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #f5f5f5;
  border-radius: 24px;
  box-shadow: 0px 2px 20px 0px #4f4f4f1a;
  padding: 16px;
}

.download-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background-color: #f7dfd5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 16px;
  flex-shrink: 0;
}

.download-details-wrapper {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}

/* استایل هر سلول در کارت */
.download-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: right;
  padding: 0 15px;
  gap: 8px;
  flex-shrink: 0;
}

.download-cell.download-col-1 * {
  text-align: right;
  color: #2f2f2f;
}
.download-cell.download-col-1 .cell-title {
  text-align: right;
  color: #2f2f2f;
}
.download-cell.download-col-1 .cell-content {
  text-align: right;
  color: #4d4d4d;
}
.download-cell .cell-title {
  font-size: 16px;
  font-weight: 400;
  line-height: 32px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #777777;
}
.download-cell .cell-content {
  font-size: 16px;
  font-weight: 400;
  line-height: 32px;
  margin: 0;
  color: #2f2f2f;
}

/* تنظیم عرض ستون‌ها */
.download-col-1 {
  max-width: 30%;
  width: 100%;
} /* محصول */
.download-col-2 {
  max-width: 25%;
  min-width: 150px;
  width: 100%;
} /* باقی‌مانده */
.download-col-3 {
  max-width: 25%;
  width: 100%;
} /* انقضاء */
.download-col-4 {
  max-width: 20%;
  width: 100%;
} /* عملیات */

/* استایل‌های خاص برای ستون عملیات */
.download-col-4 {
  align-items: center;
  gap: 10px;
}
.download-col-4 .download-button {
  background: linear-gradient(227.07deg, #e85d21 0%, #ff9a3d 96.64%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 10px 25px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  white-space: nowrap;
}
.download-col-4 .view-product-link {
  font-size: 16px !important;
  font-weight: 500 !important;
  color: #e66630;
  text-decoration: none;
}
.download-col-4 .view-product-link:hover {
  color: #e57e2c;
}

/* استایل برای کارت‌های منقضی شده یا بدون دسترسی */
.download-card:has(a.download-button[disabled]) {
  opacity: 0.6;
  background-color: #fcfcfc;
}
.download-card:has(a.download-button[disabled]) .download-button {
  background-color: #ccc !important;
  cursor: not-allowed;
}

@media (max-width: 992px) {
  .download-details-wrapper {
    flex-wrap: wrap;
    gap: 20px 0;
  }
  .download-col-1 {
    width: 100%;
  }
  .download-col-2,
  .download-col-3 {
    width: 50%;
  }
  .download-col-4 {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 968px) {
  .download-card {
    flex-direction: column;
    padding: 15px;
  }
  .download-icon-wrapper {
    margin-left: 0;
    margin-bottom: 20px;
  }
  .download-details-wrapper {
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    gap: 15px;
  }
  .download-cell {
    max-width: 100%;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0;
  }
  .download-col-4 {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .download-col-4 .download-button,
  .download-col-4 .view-product-link {
    text-align: center;
  }
  .download-cell .cell-title {
    white-space: wrap;
    overflow: visible;
    text-overflow: clip;
  }
}

/* Order Downloads */

/* dashboard */

/* dashboard */

/* dashboard */

/* مخفی کردن متن پیش‌فرض ووکامرس */
.woocommerce-account .woocommerce-MyAccount-content > p {
  display: none;
}

.custom-dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* استایل کارت‌های آماری بالا */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}
.stat-card {
  display: flex;
  align-items: center;
  background-color: #fff;
  box-shadow: 0px 2px 20px 0px #4f4f4f1a;
  border-radius: 24px;
  padding: 26px;
  gap: 16px;
}
.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: #fbefea;
}
.stat-info {
  font-size: 16px;
  font-weight: 500;
  color: #000000;
}
.stat-value {
  color: #e66630;
}
.stat-value.empty {
  color: #777777;
}

/* استایل کارت اطلاعات کاربر */
.dashboard-user-card {
  display: flex;
  align-items: center;
  background-color: #fff;
  box-shadow: 0px 2px 20px 0px #4f4f4f1a;
  border-radius: 24px;
  padding: 22px 19px;
  text-align: right;
  direction: rtl;
}
.user-avatar {
  position: relative;
  width: 56px;
  height: 56px;
  margin-left: 10px;
}
.user-avatar img {
  width: 100% !important;
  margin: 0 !important;
  border-radius: 50%;
}
.dashboard-change-profile-pic-btn {
  width: 15px;
  height: 15px;
  position: absolute;
  bottom: 1.5px;
  left: 1.5px;
  border: 0;
  border-radius: 6px;
}
.user-info .user-name {
  font-size: 16px;
  font-weight: 600;
  display: block;
  color: #1d1d1d;
}
.user-info .user-email {
  font-size: 14px;
  font-weight: 400;
  color: #a5a5a5;
}

/* استایل بخش اخبار */
.dashboard-news-section {
  box-shadow: 0px 2px 20px 0px #4f4f4f1a;
  padding: 24px;
  border-radius: 24px;
}
.dashboard-news-section .section-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 15px;
  color: #1d1d1d;
}
.news-card {
  display: flex;
  align-items: flex-start;
  background-color: #fff;
  border: 1px solid #e9e9e9;
  border-radius: 16px;
  padding: 12px;
}
.news-icon {
  color: #e57e2c;
  background-color: #fbefea;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.news-content {
  flex-grow: 1;
}
.news-header {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.news-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.news-title {
  font-weight: 500;
  color: #171717;
}
.news-date {
  font-size: 14px;
  font-weight: 400;
  color: #777777;
}
.news-body {
  font-size: 16px;
  font-weight: 500;
  color: #777777;
  margin: 0;
  line-height: 1.7; /* افزایش فاصله خطوط برای خوانایی */
  background-color: #f9f9f9;
  border-radius: 10px;
  padding: 12px;
}
.news-body p {
  margin: 0;
  display: inline; /* مهم برای نمایش ادامه متن در همان خط */
}

/* استایل‌های جدید برای "بیشتر/بستن" با جاوااسکریپت */
.news-body .dots {
  display: inline;
}
.news-body .more-content {
  display: none;
}
.news-body.is-expanded .dots {
  display: none;
}
.news-body.is-expanded .more-content {
  display: inline;
}

.toggle-news {
  background: none;
  border: none;
  color: #e57e2c;
  cursor: pointer;
  font-weight: bold;
  padding: 0;
  margin-right: 5px; /* فاصله از متن */
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-family: inherit;
}
.toggle-news span {
  pointer-events: none;
}
.toggle-news .toggle-news-arrow-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.4s ease;
}
.toggle-news .less-text {
  display: none;
}
.news-body.is-expanded .toggle-news .more-text {
  display: none;
}
.news-body.is-expanded .toggle-news .less-text {
  display: inline;
}
.news-body.is-expanded .toggle-news .toggle-news-arrow-icon {
  transform: rotate(180deg);
}

/* استایل بخش شبکه‌های اجتماعی */
.dashboard-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.social-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px;
  border-radius: 16px;
  color: #000000;
  text-decoration: none;
  background-color: #fff;
  box-shadow: 0px 2px 20px 0px #4f4f4f1a;
  overflow: hidden;
}
.social-card.linkedin .social-card-link {
  color: #007ebb;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: initial;
}
.social-card.linkedin {
  position: relative;
}
.social-card.linkedin div,
.social-card.linkedin span {
  z-index: 2;
}
.social-card.linkedin::after {
  content: "";
  position: absolute;
  left: 30px;
  width: 20px;
  height: 150%;
  background-color: #f2f8fb;
  rotate: -35deg;
  z-index: 1;
}
.social-card.linkedin::before {
  content: "";
  position: absolute;
  left: 100px;
  width: 20px;
  height: 150%;
  background-color: #f8fbfd;
  rotate: -35deg;
  z-index: 1;
}
.social-card.instagram {
  position: relative;
}
.social-card.instagram div,
.social-card.instagram span {
  z-index: 2;
}
.social-card.instagram::after {
  content: "";
  position: absolute;
  left: 30px;
  width: 20px;
  height: 150%;
  background-color: #fdf1eb;
  rotate: -35deg;
  z-index: 1;
}
.social-card.instagram::before {
  content: "";
  position: absolute;
  left: 100px;
  width: 20px;
  height: 150%;
  background-color: #fefbf9;
  rotate: -35deg;
  z-index: 1;
}
.social-card span {
  font-size: 14px;
  font-weight: 500;
}
.social-card .social-card-link {
  display: block;
  font-size: 16px;
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.social-icon {
  opacity: 1; /* تغییر برای نمایش کامل آیکون */
}

@media screen and (max-width: 1200px) {
  .dashboard-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 992px) {
  .dashboard-stats-grid,
  .dashboard-social-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .stat-card {
    flex-direction: column;
    text-align: center;
  }
  .news-card {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
  .news-header {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
  .news-body {
    line-height: 150%;
  }
}

/* dashboard */

/* form edit account */

.custom-edit-account-container {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.top-left-star-svg {
  position: absolute;
  left: 33px;
  top: -53px;
}

/* کارت اطلاعات بالای فرم */
.woocommerce-account .woocommerce-MyAccount-content .account-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  box-shadow: 0px 2px 20px 0px #4f4f4f1a;
  border-radius: 12px;
  padding: 16px 16px 16px 24px;
  margin-bottom: 16px;
}
.woocommerce-account .woocommerce-MyAccount-content .account-header-info {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.woocommerce-account .woocommerce-MyAccount-content .account-avatar-wrapper {
  display: flex;
  align-items: center;
  gap: 23px;
}
.woocommerce-account .woocommerce-MyAccount-content .account-avatar {
  width: 72px;
  height: 72px;
  position: relative;
}
.woocommerce-account .woocommerce-MyAccount-content .account-avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0;
}
.woocommerce-account .woocommerce-MyAccount-content .avatar-upload-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  border: 2px solid #fff;
  border-radius: 6px;
  font-size: 20px;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .account-meta
  .account-name {
  font-size: 16px;
  font-weight: 600;
  display: block;
  color: #1d1d1d;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .account-meta
  .account-role {
  font-size: 14px;
  font-weight: 400;
  color: #a5a5a5;
}
.woocommerce-account .woocommerce-MyAccount-content .account-header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  text-align: left;
  direction: ltr;
}
.woocommerce-account .woocommerce-MyAccount-content .account-contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 400;
  color: #a5a5a5;
  line-height: 100%;
  margin-top: 8px;
}
.woocommerce-account .woocommerce-MyAccount-content .logout-button {
  height: fit-content;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  background-color: transparent !important;
  color: #f53b3b !important;
  padding: 0 !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

/* استایل کارت‌های فرم */
.woocommerce-account .woocommerce-MyAccount-content .account-form-card {
  position: relative;
  background-color: #fff;
  border-radius: 12px;
  padding: 32px 40px 40px 40px;
  margin-bottom: 32px;
  box-shadow: 0px 2px 20px 0px #4f4f4f1a;
}
.bottom-right-star-svg {
  position: absolute;
  right: 5px;
  bottom: 5px;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .account-form-card
  .card-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 25px;
}

/* ساختار گرید برای فیلدها */
.woocommerce-account .woocommerce-MyAccount-content .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}
.woocommerce-account .woocommerce-MyAccount-content .password-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

/* استایل کلی فیلدهای فرم */
.woocommerce-account .woocommerce-MyAccount-content .custom-field-wrapper {
  width: 100%;
  position: relative;
  padding: 0 !important;
  margin: 0 !important;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-field-wrapper
  label {
  font-weight: 500;
  font-size: 14px;
  color: #444;
  margin-bottom: 8px;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-field-wrapper
  .input-text {
  background-color: #fff !important;
  border: 1px solid #e9e9e9 !important;
  border-radius: 8px !important;
  padding: 4px 16px !important;
  width: 100% !important;
  height: 40px !important;
  box-shadow: none !important;
  text-align: right;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .custom-field-wrapper
  .field-icon {
  display: none; /* مخفی کردن آیکون‌های قبلی */
}

.account-form-card .custom-field-wrapper {
  position: relative;
}

/* استایل و جایگذاری آیکون */
.account-form-card .custom-field-wrapper::before {
  content: "";
  position: absolute;
  left: 8px;
  bottom: 10px;
  width: 24px;
  height: 24px;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}
.account-form-card .custom-field-wrapper::before {
  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 opacity='0.4' d='M21 22H3C2.59 22 2.25 21.66 2.25 21.25C2.25 20.84 2.59 20.5 3 20.5H21C21.41 20.5 21.75 20.84 21.75 21.25C21.75 21.66 21.41 22 21 22Z' fill='%23E66630'/%3e%3cpath opacity='0.4' d='M19.0206 3.47991C17.0806 1.53991 15.1806 1.48991 13.1906 3.47991L11.9806 4.68991C11.8806 4.78991 11.8406 4.94991 11.8806 5.08991C12.6406 7.73991 14.7606 9.85991 17.4106 10.6199C17.4506 10.6299 17.4906 10.6399 17.5306 10.6399C17.6406 10.6399 17.7406 10.5999 17.8206 10.5199L19.0206 9.30991C20.0106 8.32991 20.4906 7.37991 20.4906 6.41991C20.5006 5.42991 20.0206 4.46991 19.0206 3.47991Z' fill='%23E66630'/%3e%3cpath d='M15.6103 11.53C15.3203 11.39 15.0403 11.25 14.7703 11.09C14.5503 10.96 14.3403 10.82 14.1303 10.67C13.9603 10.56 13.7603 10.4 13.5703 10.24C13.5503 10.23 13.4803 10.17 13.4003 10.09C13.0703 9.81005 12.7003 9.45005 12.3703 9.05005C12.3403 9.03005 12.2903 8.96005 12.2203 8.87005C12.1203 8.75005 11.9503 8.55005 11.8003 8.32005C11.6803 8.17005 11.5403 7.95005 11.4103 7.73005C11.2503 7.46005 11.1103 7.19005 10.9703 6.91005C10.8303 6.61005 10.7203 6.32005 10.6203 6.05005L4.34032 12.33C4.21032 12.46 4.09032 12.71 4.06032 12.88L3.52032 16.71C3.42032 17.39 3.61032 18.03 4.03032 18.46C4.39032 18.81 4.89032 19 5.43032 19C5.55032 19 5.67032 18.99 5.79032 18.97L9.63032 18.43C9.81032 18.4 10.0603 18.28 10.1803 18.15L16.4603 11.87C16.1803 11.77 15.9103 11.66 15.6103 11.53Z' fill='%23E66630'/%3e%3c/svg%3e");
}
.account-form-card .custom-field-wrapper.phone-input::before {
  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 opacity='0.4' d='M16.19 2H7.81C4.17 2 2 4.17 2 7.81V16.18C2 19.83 4.17 22 7.81 22H16.18C19.82 22 21.99 19.83 21.99 16.19V7.81C22 4.17 19.83 2 16.19 2Z' fill='%23E66630'/%3e%3cpath d='M16 11.25H12.75V8C12.75 7.59 12.41 7.25 12 7.25C11.59 7.25 11.25 7.59 11.25 8V11.25H8C7.59 11.25 7.25 11.59 7.25 12C7.25 12.41 7.59 12.75 8 12.75H11.25V16C11.25 16.41 11.59 16.75 12 16.75C12.41 16.75 12.75 16.41 12.75 16V12.75H16C16.41 12.75 16.75 12.41 16.75 12C16.75 11.59 16.41 11.25 16 11.25Z' fill='%23E66630'/%3e%3c/svg%3e");
}

/* ====================================================== */
/* == استایل‌های جدید برای دکمه نمایش رمز عبور == */
/* ====================================================== */

/* مخفی کردن دکمه پیش‌فرض ووکامرس */
.woocommerce-password-control {
  display: none !important;
}

/* تنظیم پدینگ برای فیلدهای رمز عبور */
.woocommerce-account
  .woocommerce-MyAccount-content
  .with-password-toggle
  .input-text {
  padding-left: 50px !important;
}

/* استایل دکمه سفارشی */
.password-toggle-btn {
  position: absolute;
  left: 4px;
  bottom: 4px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 32px;
  height: 32px;
}
.password-toggle-btn .icon-hide {
  display: none;
}
.with-password-toggle.password-visible .icon-show {
  display: none;
}
.with-password-toggle.password-visible .icon-hide {
  display: block;
}

/* دکمه ثبت نهایی */
.woocommerce-account .woocommerce-MyAccount-content .form-submit-wrapper {
  text-align: left;
  margin-top: 25px;
}
.woocommerce-account
  .woocommerce-MyAccount-content
  .form-submit-wrapper
  .button {
  background-color: #e57e2c !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 14px 40px !important;
  font-size: 16px !important;
  font-weight: bold;
}

.woocommerce form .show-password-input::before,
.woocommerce-page form .show-password-input::before {
  content: none;
}

.woocommerce-password-strength {
  position: absolute;
}

.woocommerce-password-hint {
  position: absolute;
  bottom: -64px;
}

@media (max-width: 1100px) {
  .woocommerce-account .woocommerce-MyAccount-content .password-grid {
    grid-template-columns: 1fr;
  }
  .woocommerce-account .woocommerce-MyAccount-content .form-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .woocommerce-account .woocommerce-MyAccount-content .account-header-card {
    flex-direction: column;
    gap: 20px;
  }
  .woocommerce-account .woocommerce-MyAccount-content .account-header-actions {
    flex-direction: column;
    text-align: center;
    direction: rtl;
  }
  .woocommerce-account .woocommerce-MyAccount-content .account-header-info {
    position: relative;
  }
  .woocommerce-account .woocommerce-MyAccount-content .logout-button {
    position: absolute;
    left: 0;
  }
  .woocommerce-account .woocommerce-MyAccount-content .account-avatar-wrapper {
    flex-direction: column;
    gap: 12px;
  }
  .woocommerce-account
    .woocommerce-MyAccount-content
    .account-avatar-wrapper
    .account-meta {
    text-align: center;
  }
  .woocommerce-account .woocommerce-MyAccount-content .account-contact-info {
    align-self: flex-end;
    margin-bottom: 6px;
  }
}

/* form edit account */

/* my certificates */

/* ====================================================== */
/* == استایل‌های سفارشی برای صفحه گواهینامه‌ها == */
/* ====================================================== */

.custom-certificates-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* استایل هر کارت گواهینامه */
.certificate-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background-color: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* بخش تصویر */
.cert-card-image img {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  object-fit: cover;
}

/* بخش جزئیات وسط */
.cert-card-details {
  flex-grow: 1;
}
.cert-meta {
  font-size: 14px;
  color: #777;
  margin-bottom: 8px;
}
.cert-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin: 0 0 15px 0;
}

/* بخش دایره‌های پیشرفت */
.cert-progress-wrapper {
  display: flex;
  gap: 20px;
}
.progress-item {
  text-align: center;
}

/* کد جدید برای دایره پیشرفت */
.progress-circle {
  --p: 0; /* مقدار پیش‌فرض درصد */
  --b: 4px; /* ضخامت خط */
  --c: #e57e2c; /* رنگ خط پیشرفت */
  --bg: #f0f0f0; /* رنگ پس‌زمینه خط */

  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;

  /* ایجاد دایره با conic-gradient */
  background: radial-gradient(
      closest-side,
      white 85%,
      transparent 0 99.9%,
      white 0
    ),
    conic-gradient(var(--c) calc(var(--p) * 1%), var(--bg) 0);

  transition: background 0.3s;
}
.progress-circle span {
  font-weight: bold;
  color: #e57e2c;
}

.progress-item span {
  font-size: 13px;
  color: #555;
}

/* بخش عملیات چپ */
.cert-card-actions {
  flex-basis: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.action-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.info-box {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  text-align: center;
}
.info-box .info-box-icon {
  width: 28px;
  height: 28px;
  background-color: #fbefea;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.info-box span {
  font-size: 12px;
  color: #777;
  display: block;
}
.info-box strong {
  font-size: 14px;
  color: #333;
}

/* استایل دکمه‌ها */
.cert-card-actions .button {
  text-align: center;
  padding: 12px !important;
  border-radius: 8px !important;
  font-weight: bold !important;
  text-decoration: none;
  display: block;
}
.view-cert-btn {
  background-color: #fef3e8 !important;
  color: #e57e2c !important;
  border: 1px solid #fdefe2 !important;
}
.download-cert-btn {
  background-color: #e57e2c !important;
  color: #fff !important;
  border: none !important;
}

/* ====================================================== */
/* == کدهای ریسپانسیو == */
/* ====================================================== */
@media (max-width: 1200px) {
  .certificate-card {
    flex-direction: column;
    align-items: stretch;
  }
  .cert-card-actions {
    flex-basis: auto;
  }
  .cert-card-image {
    align-self: center;
  }
  .cert-title,
  .cert-meta {
    text-align: center;
  }
  .cert-progress-wrapper {
    justify-content: space-around;
  }
}
@media (max-width: 768px) {
  .cert-progress-wrapper {
    justify-content: space-around;
  }
}

/* my certificates */

/* view certificate */

/* ====================================================== */
/* == استایل‌های سفارشی برای صفحه مشاهده گواهینامه == */
/* ====================================================== */

.single-certificate-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* کارت خلاصه دوره */
.course-summary-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background-color: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.course-summary-image img {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  object-fit: cover;
}
.course-summary-details {
  flex-grow: 1;
}
.course-meta {
  width: 100%;
  font-size: 14px;
  color: #777;
  margin-bottom: 8px;
}
.course-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin: 0 0 15px 0;
  margin-left: 40px;
}
.course-progress-wrapper {
  display: flex;
  gap: 20px;
}
.progress-item {
  text-align: center;
}
.progress-circle {
  --p: 0;
  --b: 4px;
  --c: #e57e2c;
  --bg: #f0f0f0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  background: radial-gradient(
      closest-side,
      white 85%,
      transparent 0 99.9%,
      white 0
    ),
    conic-gradient(var(--c) calc(var(--p) * 1%), var(--bg) 0);
}
.progress-circle span {
  font-weight: bold;
  color: #e57e2c;
}
.progress-item span {
  font-size: 13px;
  color: #555;
}

/* نوار اطلاعات آماری */
.course-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  border: 1px solid #f7dfd5;
  border-radius: 24px;
  padding: 24px;
  margin-inline: 32px;
  box-shadow: 0px 2px 15px 0px #f1742b26;
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #555;
}
.stat-item svg {
  color: #e57e2c;
}

.stat-item .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background-color: #fbefea;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-item span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* پیام موفقیت */
.success-message {
  font-size: 18px;
  font-weight: 500;
  color: #26b54c;
}
.success-message p {
  margin: 0;
}

/* ====================================================== */
/* == استایل‌های جدید برای بخش گواهینامه == */
/* ====================================================== */

/* حذف استایل قبلی */
.certificate-image-wrapper {
  display: none;
}

/* کانتینر اصلی برای موقعیت‌دهی */
.certificate-display-wrapper {
  max-width: 777px;
  max-height: 490px;
  position: relative;
  line-height: 0;
  margin: auto;
}
.certificate-display-wrapper .cert-bg-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* لایه متن روی عکس */
.certificate-content-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  line-height: 1.5;
}

.certificate-content-overlay > div {
  position: absolute;
}

.cert-qr-code {
  top: 14%;
  left: 7%;
  width: 80px;
  height: 80px;
}
.cert-qr-code img {
  width: 100%;
  height: auto;
}

.cert-header-text {
  top: 15%;
  right: 12%;
  text-align: right;
  color: #e57e2c;
}
.cert-header-text p {
  font-size: 18px;
  font-weight: 600;
}
.cert-header-text span {
  font-size: 14px;
  font-weight: 400;
}

.cert-main-info {
  top: 29%;
  right: 12%;
}
.cert-main-info h4 {
  font-weight: 600;
  font-size: 28px;
  line-height: 100%;
  color: #e57e2c;
  margin-bottom: 16px;
}
.cert-main-info p {
  font-size: 16px;
  font-weight: 500;
  color: #2f2f2f;
  margin-bottom: 8px;
}
.cert-main-info h5 {
  font-size: 18px;
  font-weight: 600;
  color: #3751e6;
}

.cert-description {
  display: flex;
  flex-direction: column;
  gap: 24px;
  top: 54%;
  right: 12%;
  font-size: 14px;
  font-weight: 400;
  margin-left: 56px;
}

.cert-footer-left {
  top: 82%;
  left: 12%;
  text-align: center;
}

.cert-footer-left p {
  font-size: 14px;
  font-weight: 400;
  color: #e57e2c;
}
.cert-footer-left span {
  font-size: 16px;
  font-weight: 500;
  color: #1d1d1d;
  display: block;
  margin-top: 8px;
}

/* دکمه دانلود */
.download-button-wrapper {
  text-align: center;
}
.download-button-wrapper .download-button {
  background-color: #e57e2c !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 14px 40px !important;
  font-size: 16px !important;
  font-weight: bold;
  text-decoration: none;
}

/* ====================================================== */
/* == کدهای ریسپانسیو == */
/* ====================================================== */
@media (max-width: 1150px) {
  .cert-header-text p {
    font-size: 14px;
  }
  .cert-header-text span {
    font-size: 12px;
  }
  .cert-main-info h4 {
    font-size: 22px;
  }
  .cert-main-info p {
    font-size: 13px;
  }
  .cert-main-info h5 {
    font-size: 16px;
  }
  .cert-description {
    font-size: 14px;
    gap: 12px;
    top: 54%;
  }
  .cert-footer-left p {
    font-size: 10px;
  }
  .cert-footer-left strong {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .course-summary-card,
  .course-stats-bar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .course-progress-wrapper {
    justify-content: center;
  }
  .course-stats-bar {
    gap: 15px;
    align-items: center;
  }
  .cert-header-text p {
    font-size: 12px;
  }
  .cert-header-text span {
    font-size: 10px;
  }
  .cert-main-info h1 {
    font-size: 18px;
  }
  .cert-main-info p {
    font-size: 11px;
  }
  .cert-main-info h2 {
    font-size: 14px;
  }
  .cert-footer-left span {
    margin-top: 3px;
  }
}

@media (max-width: 600px) {
  .cert-description {
    top: 52%;
  }
  .certificate-display-wrapper {
    height: 380px;
  }
  .certificate-display-wrapper .cert-bg-image {
    height: 100%;
  }
  .cert-main-info h4 {
    margin-bottom: 12px;
  }
  .cert-main-info p {
    margin-bottom: 6px;
  }
}

/* view certificate */

/* my reviews */

/* ====================================================== */
/* == استایل‌های نهایی برای صفحه دیدگاه‌ها == */
/* ====================================================== */

.my-reviews-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* هر آیتم آکاردئون */
.review-accordion-item {
  background-color: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}
.review-accordion-item.is-open {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* هدر آکاردئون */
.review-accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  gap: 32px;
}
.review-course-info {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 15px;
}
.review-course-info .course-image {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  object-fit: cover;
}
.course-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}
.course-instructor {
  font-size: 14px;
  color: #777;
}
.review-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  align-self: flex-start;
}
.review-header-right .accordion-arrow {
  background-color: #fbefea;
  border-radius: 50%;
  padding: 4px;
}
.review-excerpt {
  border: 1px solid #e9e9e9;
  border-radius: 6px;
  padding: 8px 16px;
  color: #777;
  font-size: 14px;
  margin-top: 24px;
}
.review-accordion-item.is-open .review-excerpt {
  display: none;
}
.accordion-arrow {
  transition: transform 0.4s ease;
}
.review-accordion-item.is-open .accordion-arrow {
  transform: rotate(180deg);
}

/* محتوای آکاردئون */
.review-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
  padding: 0 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.review-accordion-item.is-open .review-accordion-content {
  margin-bottom: 24px;
  padding-top: 24px;
  margin-top: -10px;
}

/* ====================================================== */
/* == استایل‌های جدید برای کارت‌های کامنت (طرح شما) == */
/* ====================================================== */
.comment-card {
  background-color: #ffffff;
  border-radius: 24px;
  padding: 24px;
  border: 1px solid #f7dfd5;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 40px;
}

.admin-reply .author-info {
  gap: 8px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 16px;
}

.rating-and-rate-comment {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.author-name {
  font-weight: 400;
  font-size: 14px;
  color: #000000;
  text-wrap: nowrap;
}

.rating {
  margin-top: 0.25rem;
}

.rating-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #2f2f2f;
  font-weight: 500;
  font-size: 18px;
  line-height: 36px;
}

.comment-meta {
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 400;
  color: #777777;
}

.comment-body {
  display: flex;
  gap: 24px;
}

.comment-body p {
  color: #777777;
  font-size: 14px;
  font-weight: 400;
  text-align: justify;
}

.admin-reply .comment-body img {
  width: 43px !important;
  height: 16px !important;
}

.admin-reply {
  margin-right: 103px;
  padding-top: 32px;
  position: relative;
}

.site-logo-admin-comment {
  position: absolute;
  right: -57px;
  top: 24px;
  width: 40px;
  height: 40px;
  background-color: #fbefea;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 9999px;
  padding: 4px;
  box-sizing: border-box;
}

.site-logo-admin-comment img {
  width: 100% !important;
}

/* ====================================================== */
/* == کدهای ریسپانسیو == */
/* ====================================================== */
@media (max-width: 768px) {
  .review-accordion-header {
    position: relative;
  }
  .review-header-right {
    position: absolute;
    left: 16px;
    top: 16px;
  }
  .admin-reply {
    margin-right: 20px;
  }
  .site-logo-admin-comment {
    right: -15px;
  }
  .review-course-info {
    flex-direction: column;
  }
  .course-title {
    text-align: center;
    margin-left: 0;
  }
  .course-instructor {
    display: block;
    text-align: center;
  }
  .author-info {
    flex-direction: column;
  }
}

/* my reviews */

/* courses */

/* ====================================================== */
/* == استایل‌های نهایی برای صفحه دوره‌های من (با کلاس‌های منحصر به فرد) == */
/* ====================================================== */

.pad-my-courses-container {
  width: 100%;
}

/* استایل تب‌ها */
.pad-my-courses-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}
.pad-my-courses-tab-btn {
  position: relative;
  background: none;
  border: none;
  padding: 10px 5px;
  padding-right: 0;
  font-size: 16px;
  font-weight: 500;
  color: #eea586;
  cursor: pointer;
  transition: color 0.3s eases;
}

.pad-my-courses-tab-btn.active {
  color: #e66630;
}

.pad-my-courses-tab-btn::before,
.pad-my-courses-tab-btn::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 4px;
  border-radius: 24px;
  background-color: #ff784d;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.pad-my-courses-tab-btn::after {
  right: 0;
  width: 18px;
}

.pad-my-courses-tab-btn::before {
  right: 19px;
  width: 4px;
  transition-delay: 0.1s;
}

.pad-my-courses-tab-btn.active::before,
.pad-my-courses-tab-btn.active::after {
  opacity: 1;
  transform: translateY(0);
}

/* محتوای تب‌ها */
.pad-my-courses-tab-content {
  display: none;
}
.pad-my-courses-tab-content.active {
  display: block;
}
.pad-my-courses-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* استایل هر کارت دوره */
.pad-my-courses-list-item {
  background-color: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.pad-my-courses-main-info {
  display: flex;
  gap: 20px;
  padding: 20px;
}

.pad-my-courses-image {
  width: 200px;
  height: 150px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.pad-my-courses-details {
  flex-grow: 1;
}
.pad-my-courses-meta {
  font-size: 14px;
  color: #777;
  margin-bottom: 8px;
}
.pad-my-courses-title {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin: 0 0 15px 0;
}
.pad-my-courses-progress-wrapper {
  display: flex;
  gap: 20px;
}
.pad-my-courses-progress-item {
  text-align: center;
}
.pad-my-courses-progress-circle {
  --p: 0;
  --b: 4px;
  --c: #e57e2c;
  --bg: #f0f0f0;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
  background: radial-gradient(
      closest-side,
      white 85%,
      transparent 0 99.9%,
      white 0
    ),
    conic-gradient(var(--c) calc(var(--p) * 1%), var(--bg) 0);
}
.pad-my-courses-progress-circle.zero-pecent span {
  color: #cdcdcd;
}
.pad-my-courses-progress-circle span {
  font-weight: bold;
  color: #e57e2c;
}
.pad-my-courses-progress-item > span {
  font-size: 13px;
  color: #555;
}

/* بخش عملیات */
.pad-my-courses-action-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  flex-shrink: 0;
}
.pad-my-courses-action-box {
  border: 1px solid #e9e9e9;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.pad-my-courses-info-grid {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}
.pad-my-courses-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pad-my-courses-info-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background-color: #fbefea;
}
.pad-my-courses-info-content span {
  font-size: 14px;
  font-weight: 400;
  color: #777777;
  display: block;
}
.pad-my-courses-info-content .pad-my-courses-info-date {
  color: #2f2f2f;
  margin-top: 8px;
}
.pad-my-courses-action-btn {
  background: linear-gradient(227.07deg, #e85d21 0%, #ff9a3d 96.64%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 12px !important;
  font-weight: bold !important;
  text-align: center;
  text-decoration: none;
  margin-bottom: 10px;
  box-shadow: 0px 2px 15px 0px #f1742b33 !important;
}

/* آکاردئون دروس */
.pad-my-courses-lessons-accordion {
  border-radius: 8px;
  border: 1px solid #e66630;
}
.pad-my-courses-lessons-accordion.zero-lessons-learned {
  background-color: #e9e9e9;
  border: none;
}
.pad-my-courses-lessons-accordion.zero-lessons-learned
  .pad-my-courses-accordion-header
  svg {
  color: #f2c6b2;
}
.pad-my-courses-accordion-header {
  padding: 8px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #e66630;
}
.pad-my-courses-accordion-arrow {
  transition: transform 0.3s ease;
}
.pad-my-courses-lessons-accordion.is-open .pad-my-courses-accordion-arrow {
  transform: rotate(180deg);
}
.pad-my-courses-accordion-content {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 10;
  background-color: #fff;
  border: 1px solid #e66630;
  border-radius: 8px;
  box-shadow: 0px 2px 20px 0px #f1772c33;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out,
    opacity 0.3s ease-out;
  opacity: 0;
  padding: 16px;
}

.pad-my-courses-lessons-accordion.is-open .pad-my-courses-accordion-content {
  max-height: 300px;
  overflow-y: auto;
  opacity: 1;
  padding: 16px 16px 16px 6px;
}
.pad-my-courses-lesson-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pad-my-courses-lesson-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 400;
}
.pad-my-courses-lesson-status-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #ccc;
  position: relative;
  flex-shrink: 0;
}
.pad-my-courses-lesson-item.completed .pad-my-courses-lesson-status-icon {
  width: 18px;
  height: 18px;
  background-color: #e57e2c;
  border-color: #e57e2c;
  margin-right: 2px;
}
.pad-my-courses-lesson-item.completed
  .pad-my-courses-lesson-status-icon::after {
  content: "✔";
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
}
.pad-my-courses-lesson-item.ongoing {
  color: #e15215;
}

.pad-my-courses-lesson-item.ongoing .pad-my-courses-lesson-status-icon {
  border-color: #ff9a3d;
}
.pad-my-courses-lesson-item.locked {
  color: #999;
}

/* ریسپانسیو */
@media (max-width: 1200px) {
  .pad-my-courses-main-info {
    flex-direction: column;
    align-items: stretch;
  }
  .pad-my-courses-main-info .pad-my-courses-image,
  .pad-my-courses-details {
    align-self: center;
    text-align: center;
  }
  .pad-my-courses-progress-wrapper {
    justify-content: space-between;
  }
}
@media (max-width: 768px) {
  .pad-my-courses-progress-wrapper {
    justify-content: space-around;
  }
}

/* courses */

.woocommerce-error {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 32px;
  padding-block: 12px;
  border: none;
  outline: none;
  border-radius: 8px;
  box-shadow: 0px 2px 20px 0px #4f4f4f1a;
  margin-bottom: 24px;
}

.woocommerce-error::before {
  top: 50%;
  transform: translateY(-50%);
  right: 5px;
}

.woocommerce-error::after {
  content: none;
}
