/**
 * Panel loading skeleton + shimmer (shared across my-account / WooCommerce panel).
 * Order-book–specific spacing lives in trades.css under .trades-orderbook.
 */

 .ayarka-skeleton-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #e6e6e6;
  padding: 10px;
  margin: 2px 8px;
}

.ayarka-skeleton-line {
  height: 13px;
  border-radius: 8px;
  background: #dcdcdc;
  margin-bottom: 10px;
}

#tradesSellOrderRows > .ayarka-skeleton-card:nth-child(1) {
  margin-top: 8px !important;
}
#tradesSellOrderRows > .ayarka-skeleton-card:nth-child(8) {
  margin-bottom: 8px !important;
}
#tradesBuyOrderRows > .ayarka-skeleton-card:nth-child(1) {
  margin-top: 8px !important;
}
#tradesBuyOrderRows > .ayarka-skeleton-card:nth-child(8) {
  margin-bottom: 8px !important;
}

.ayarka-skeleton-line {
  width: 85%;
}

.ayarka-skeleton-line:last-child {
  margin-bottom: 0;
}

.ayarka-skeleton-line--lg {
  width: 95%;
  height: 14px;
  margin-right: 2.5%;
}

.ayarka-skeleton-line--sm {
  width: 60%;
}

.ayarka-skeleton-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 150%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: ayarkaSkeletonShimmer 1.25s linear infinite;
}

@keyframes ayarkaSkeletonShimmer {
  0% {
    left: -150%;
  }
  100% {
    left: 100%;
  }
}

/* Inline value placeholders (price, balance, codes) — narrow, no full-card overlay */
.ayarka-skeleton-inline {
  display: inline-block;
  vertical-align: middle;
  min-width: 3.25em;
  height: 1.15em;
  border-radius: 6px;
  background: #efefef;
  position: relative;
  overflow: hidden;
}

.ayarka-skeleton-inline--wide {
  min-width: 4em;
}

.ayarka-skeleton-inline--xl {
  min-width: 7.5em;
  height: 1.15em;
}

.ayarka-skeleton-inline--code {
  min-width: 6.5em;
  height: 1.2em;
}

/* ارزش کل دارایی (داشبورد) — نوار بلندتر، شاین کندتر */
.ayarka-skeleton-inline--total-asset {
  min-width: 10.5em;
  height: 1.4em;
  border-radius: 10px;
  background: #e4e4e4;
}

.ayarka-skeleton-inline--total-asset::after {
  animation-duration: 1.55s;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* موجودی کنار دراپ‌دارن فیزیکی — کپسول کوتاه‌تر، شاین تندتر */
.ayarka-skeleton-inline--asset-dropdown {
  min-width: 4.25em;
  height: 1.05em;
  border-radius: 999px;
  background: #eaeaea;
}

.ayarka-skeleton-inline--asset-dropdown::after {
  animation-duration: 0.95s;
}

/* ردیف اطلاعات حساب / مینی‌کلکولاتور داشبورد */
.ayarka-skeleton-inline--account {
  min-width: 6.5em;
  height: 1.05em;
}

.ayarka-skeleton-inline--account-phone {
  min-width: 8em;
  height: 1.05em;
}

/* قیمت لحظه‌ای هنگام رفرش نمودار */
.ayarka-skeleton-inline--live-price::after {
  animation-duration: 1.05s;
}

.ayarka-skeleton-inline::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 120%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: ayarkaSkeletonShimmer 1.25s linear infinite;
}

/* Physical delivery: address block while REST pending */
.pd-address-skeleton-host {
  position: relative;
  overflow: hidden;
  padding: 10px 0 14px;
  min-height: 72px;
}

/* شاین روی بلوک آدرس (نه .address-info که محتوای واقعی پس از بارگذاری است) */
.pd-address-skeleton-host::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 150%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: ayarkaSkeletonShimmer 1.25s linear infinite;
}

.pd-address-skeleton-host .ayarka-skeleton-line {
  position: relative;
  z-index: 0;
  margin-bottom: 15px;
}

.pd-address-skeleton-host .ayarka-skeleton-line:last-child {
  margin-bottom: 0;
}

/* Table body placeholder rows */
.ayarka-skeleton-table-row td {
  padding: 10px 12px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ayarka-skeleton-table-row .ayarka-skeleton-line {
  margin-bottom: 0;
}

.ayarka-skeleton-table-row td .ayarka-skeleton-line + .ayarka-skeleton-line {
  margin-top: 8px;
}

/* Bank card list placeholders (matches rough card height) */
.ayarka-skeleton-bank-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #ececec;
  min-height: 72px;
  /* margin-bottom: 12px; */
}

.ayarka-skeleton-bank-card:last-child {
  margin-bottom: 0;
}

.ayarka-skeleton-bank-card__inner {
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  min-height: 84px;
}

.ayarka-skeleton-bank-card__avatar {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #dcdcdc;
}

.ayarka-skeleton-bank-card__lines {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.ayarka-skeleton-bank-card__line {
  display: block;
  height: 14px;
  border-radius: 8px;
  background: #d4d4d4;
  width: 72%;
  max-width: 100%;
}

.ayarka-skeleton-bank-card__line--short {
  width: 48%;
}

.ayarka-skeleton-bank-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 150%;
  height: 100%;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: ayarkaSkeletonShimmer 1.25s linear infinite;
  pointer-events: none;
}

/* Full-region overlay (dashboard, calculator column, etc.) */
.ayarka-skeleton-overlay-host {
  position: relative;
}

.ayarka-skeleton-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
  pointer-events: none;
}

.ayarka-skeleton-overlay::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 80%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.75) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: ayarkaSkeletonShimmer 1.25s linear infinite;
}

/* هنگام رفرش نمودار: جایگزین موقت برای نقطهٔ زنده تا داده بیاید */
.woocommerce-MyAccount-content .status-indicator.ayarka-live-price-loading {
  overflow: visible;
}

.woocommerce-MyAccount-content .status-indicator.ayarka-live-price-loading .pulse-animation,
.woocommerce-MyAccount-content .status-indicator.ayarka-live-price-loading .dot-animation {
  opacity: 0.12;
  animation-play-state: paused;
}

.woocommerce-MyAccount-content .status-indicator.ayarka-live-price-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 12px;
  border-radius: 6px;
  background: #dedede;
  z-index: 4;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.woocommerce-MyAccount-content .status-indicator.ayarka-live-price-loading::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 12px;
  margin-left: -18px;
  margin-top: -6px;
  z-index: 5;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: ayarkaSkeletonShimmer 1.1s linear infinite;
  pointer-events: none;
}
