/* Featured 18k gold price chart. */
.agm-gold-chart {
  margin: 34px 0 28px;
  padding: clamp(18px, 3vw, 30px);
  overflow: hidden;
  background: var(--agm-card);
  border: 1px solid var(--agm-line);
  border-radius: 24px;
  box-shadow: var(--agm-shadow);
}

.agm-gold-hero {
  grid-template-columns: minmax(260px, .7fr) minmax(560px, 1.3fr);
  min-height: 520px;
  gap: clamp(28px, 4vw, 55px);
  padding: 42px clamp(24px, 4vw, 60px);
}

.agm-gold-chart--hero {
  min-width: 0;
  margin: 0;
  padding: 22px;
  color: var(--agm-ink);
  background: var(--agm-card);
  border-color: var(--agm-line);
  backdrop-filter: none;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.agm-gold-seo-updated {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  margin-top: 16px;
  color: #e2c47f;
  font-size: 11px;
  font-weight: 600;
  background: rgba(197, 156, 78, .1);
  border: 1px solid rgba(197, 156, 78, .22);
  border-radius: 999px;
}

.agm-gold-chart__header {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
}

.agm-gold-chart__header h2 {
  margin: 8px 0 0;
  color: var(--agm-ink);
  font-size: clamp(19px, 2.2vw, 27px);
  line-height: 1.45;
}

.agm-gold-chart__identity {
  display: flex;
  gap: 13px;
  align-items: center;
}

.agm-gold-chart__icon {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(245, 165, 36, .2), rgba(197, 156, 78, .08));
  border: 1px solid rgba(197, 156, 78, .36);
  border-radius: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 10px 26px rgba(197, 156, 78, .12);
  place-items: center;
}

.agm-gold-chart__icon svg {
  width: 39px;
  height: 39px;
  overflow: visible;
}

.agm-gold-chart__icon-spark {
  fill: none;
  stroke: #f8d98c;
  stroke-width: 3;
  stroke-linecap: round;
}

.agm-gold-chart__icon-back {
  fill: rgba(245, 165, 36, .34);
  stroke: #d5a84f;
  stroke-width: 2;
  stroke-linejoin: round;
}

.agm-gold-chart__icon-bar {
  fill: #C59C4E;
  stroke: #f1cf74;
  stroke-width: 2;
  stroke-linejoin: round;
}

.agm-gold-chart__icon-line {
  fill: none;
  stroke: rgba(17, 46, 98, .62);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agm-gold-chart__eyebrow {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--agm-muted);
  font-size: 13px;
  font-weight: 700;
}

.agm-gold-chart__eyebrow i {
  width: 8px;
  height: 8px;
  background: var(--agm-down);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(243, 18, 96, .1);
  animation: agm-chart-live 1.8s ease-in-out infinite;
}

.agm-gold-chart__live {
  flex: 0 0 auto;
  text-align: left;
}

.agm-gold-chart__live > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: flex-end;
  direction: rtl;
}

.agm-gold-chart__primary > strong {
  display: inline-block;
  margin: 0;
  color: var(--agm-ink);
  font-size: clamp(22px, 3vw, 34px);
  font-weight: 700 !important;
  line-height: 1.3;
  direction: ltr;
  order: 1;
}

.agm-gold-chart__primary > b {
  display: inline-block;
  margin: 0;
  color: var(--agm-gold);
  font-size: 14px !important;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  order: 2;
}

.agm-gold-chart__change {
  display: inline-flex;
  padding: 4px 9px;
  color: var(--agm-muted);
  font-size: 12px;
  font-weight: 700;
  background: rgba(107, 114, 128, .09);
  border-radius: 999px;
}

.agm-gold-chart__change.is-up {
  color: var(--agm-up);
  background: rgba(23, 201, 100, .1);
}

.agm-gold-chart__change.is-down {
  color: var(--agm-down);
  background: rgba(243, 18, 96, .09);
}

.agm-gold-chart__live-meta {
  display: flex;
  gap: 8px;
  align-items: center !important;
  justify-content: flex-end;
  margin: 0;
  direction: rtl;
  flex-wrap: wrap;
}

.agm-gold-chart__subbar {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  margin: 14px 0 10px;
}

.agm-gold-chart__ounce {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 4px 8px;
  color: var(--agm-muted);
  font-size: 10px;
  background: rgba(90, 128, 245, .07);
  border: 1px solid rgba(90, 128, 245, .12);
  border-radius: 999px;
  white-space: nowrap;
}

.agm-gold-chart__ounce svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: var(--agm-info);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agm-gold-chart__ounce strong {
  display: inline-flex;
  align-items: center;
  height: 16px;
  margin: 0;
  color: var(--agm-ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  direction: ltr;
}

.agm-gold-chart__ounce small {
  display: inline-flex;
  align-items: center;
  height: 16px;
  margin: 0;
  color: var(--agm-muted);
  font-size: 9px;
  line-height: 1;
}

.agm-gold-chart__ounce > span {
  display: inline-flex;
  align-items: center;
  height: 16px;
  margin: 0;
  line-height: 1;
}

.agm-gold-chart__tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  margin: 0;
  background: rgba(212, 212, 216, .32);
  border-radius: 12px;
}

.agm-gold-chart__tabs button {
  padding: 6px 15px;
  color: var(--agm-muted);
  font-size: 10px;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.agm-gold-chart__tabs button.is-active {
  color: var(--agm-navy);
  font-weight: 800;
  background: var(--agm-card);
  box-shadow: 0 4px 12px rgba(17, 46, 98, .1);
}

.agm-gold-chart__canvas {
  display: grid;
  position: relative;
  min-height: 215px;
  overflow-x: auto;
  overflow-y: hidden;
  place-items: center;
  scrollbar-width: thin;
}

.agm-gold-chart__canvas svg {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
  direction: ltr;
  cursor: crosshair;
  outline: none;
}

.agm-gold-chart__grid line {
  stroke: var(--agm-line);
  stroke-width: 1;
  stroke-dasharray: 3 6;
}

.agm-gold-chart__grid text {
  fill: var(--agm-muted);
  font-size: 11px;
}

.agm-gold-chart__grid .agm-gold-chart__axis-value {
  font-size: 12px;
  font-weight: 700;
  direction: rtl;
  unicode-bidi: isolate;
}

.agm-gold-chart__area {
  fill: rgba(197, 156, 78, .14);
}

.agm-gold-chart stop {
  stop-color: var(--agm-gold);
}

.agm-gold-chart__line {
  fill: none;
  stroke: var(--agm-warning);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 5px 7px rgba(245, 165, 36, .2));
}

.agm-gold-chart__pulse {
  fill: rgba(245, 165, 36, .2);
  transform-box: fill-box;
  transform-origin: center;
  animation: agm-chart-pulse 1.8s ease-out infinite;
}

.agm-gold-chart__dot {
  fill: var(--agm-warning);
  stroke: var(--agm-card);
  stroke-width: 2;
}

.agm-gold-chart__hover {
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease;
}

.agm-gold-chart__hover.is-visible { opacity: 1; }

.agm-gold-chart__hover line {
  stroke: rgba(17, 46, 98, .38);
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
}

.agm-gold-chart__hover circle {
  fill: var(--agm-card);
  stroke: var(--agm-warning);
  stroke-width: 3;
  filter: drop-shadow(0 3px 5px rgba(245, 165, 36, .28));
}

.agm-gold-chart__tooltip {
  position: fixed;
  z-index: 999999;
  display: grid;
  min-width: 150px;
  gap: 3px;
  padding: 10px 13px;
  border: 1px solid rgba(197, 156, 78, .3);
  border-radius: 12px;
  background: #112e62;
  box-shadow: 0 12px 28px rgba(17, 46, 98, .22);
  color: #fff;
  direction: rtl;
  opacity: 0;
  pointer-events: none;
  text-align: right;
  transition: opacity .14s ease;
  white-space: nowrap;
}

.agm-gold-chart__tooltip.is-visible { opacity: 1; }

.agm-gold-chart__tooltip span {
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 500;
}

.agm-gold-chart__tooltip strong {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
}

.agm-gold-chart__tooltip small {
  color: #f5a524;
  font-size: 11px;
  font-weight: 600;
}

.agm-gold-chart__empty {
  display: grid;
  width: 100%;
  min-height: 180px;
  color: var(--agm-muted);
  font-size: 11px;
  border: 1px dashed var(--agm-line);
  border-radius: 18px;
  place-items: center;
}

.agm-gold-chart__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 5px;
  border-top: 1px solid var(--agm-line);
}

.agm-gold-chart__stats > div {
  padding: 12px 12px 0;
  text-align: center;
}

.agm-gold-summary__icon svg {
  width: 27px;
  height: 27px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.agm-gold-summary__icon .agm-summary-fill {
  fill: currentColor;
  opacity: .14;
}

.agm-gold-widget.is-dark .agm-gold-summary__icon {
  color: #e2c47f;
}

.agm-summary-mobile {
  display: none !important;
}

.agm-gold-chart__stats > div + div {
  border-right: 1px solid var(--agm-line);
}

.agm-gold-chart__stats span {
  display: block;
  color: var(--agm-muted);
  font-size: 13px;
  font-weight: 600;
}

.agm-gold-widget .agm-gold-chart__stats strong {
  display: flex;
  gap: 5px;
  align-items: baseline;
  justify-content: center;
  margin-top: 4px;
  color: var(--agm-ink);
  font-size: clamp(23px, 2.2vw, 28px) !important;
  font-weight: 700 !important;
  line-height: 1.6;
  direction: rtl;
}

.agm-gold-chart__number {
  font-size: inherit !important;
  font-weight: inherit !important;
  direction: ltr;
  order: 1;
}

.agm-gold-chart__currency {
  color: currentColor;
  font-size: .7em;
  font-weight: 700;
  white-space: nowrap;
  order: 2;
}

.agm-gold-chart__stats strong.is-up { color: var(--agm-up); }
.agm-gold-chart__stats strong.is-down { color: var(--agm-down); }

.agm-gold-widget.is-dark .agm-gold-chart__stats strong:not(.is-up):not(.is-down),
.agm-gold-widget.is-dark .agm-gold-chart__stats strong:not(.is-up):not(.is-down) .agm-gold-chart__number,
.agm-gold-widget.is-dark .agm-gold-chart__stats strong:not(.is-up):not(.is-down) .agm-gold-chart__currency {
  color: #fff !important;
}

.agm-gold-widget.is-dark .agm-gold-chart__tabs {
  background: rgba(212, 212, 216, .08);
}

.agm-gold-widget.is-dark .agm-gold-chart__tabs button.is-active {
  color: #112E62;
  background: var(--agm-gold);
}

.agm-gold-widget.is-dark .agm-gold-chart__area {
  fill: rgba(197, 156, 78, .16);
}

.agm-gold-card__bottom > span {
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  min-height: 28px;
  padding: 4px 10px;
  line-height: 1.2;
  white-space: nowrap;
  direction: rtl;
  border: 1px solid transparent;
  border-radius: 999px;
}

.agm-gold-card__bottom .is-up {
  color: var(--agm-up);
  background: rgba(23, 201, 100, .1);
  border-color: rgba(23, 201, 100, .16);
}

.agm-gold-card__bottom .is-down {
  color: var(--agm-down);
  background: rgba(243, 18, 96, .08);
  border-color: rgba(243, 18, 96, .14);
}

.agm-gold-card__bottom .is-flat {
  color: var(--agm-muted);
  background: rgba(107, 114, 128, .08);
  border-color: rgba(107, 114, 128, .12);
}

.agm-gold-asset__icon svg {
  width: 25px;
  height: 25px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}

.agm-gold-asset__icon .agm-icon-fill {
  fill: currentColor;
  opacity: .14;
}

.agm-gold-asset__icon .agm-icon-solid {
  fill: currentColor;
  stroke: none;
  opacity: .3;
}

.agm-gold-card:hover .agm-gold-asset__icon svg {
  transform: scale(1.06);
}

.agm-gold-widget .agm-gold-unit:hover,
.agm-gold-widget .agm-gold-unit:focus-visible,
.agm-gold-widget .agm-gold-unit:active,
.agm-gold-widget .agm-gold-refresh:hover,
.agm-gold-widget .agm-gold-refresh:focus-visible,
.agm-gold-widget .agm-gold-refresh:active {
  color: var(--agm-navy) !important;
  -webkit-text-fill-color: var(--agm-navy);
  background: #fff !important;
  border-color: var(--agm-gold) !important;
  opacity: 1 !important;
}

.agm-gold-widget.is-dark .agm-gold-unit:hover,
.agm-gold-widget.is-dark .agm-gold-unit:focus-visible,
.agm-gold-widget.is-dark .agm-gold-unit:active,
.agm-gold-widget.is-dark .agm-gold-refresh:hover,
.agm-gold-widget.is-dark .agm-gold-refresh:focus-visible,
.agm-gold-widget.is-dark .agm-gold-refresh:active {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  background: #17315c !important;
  border-color: var(--agm-gold) !important;
  opacity: 1 !important;
}

.agm-gold-widget .agm-gold-card__value,
.agm-gold-widget .agm-gold-card__number {
  font-weight: 700 !important;
}

.agm-gold-card__bottom .is-pending {
  font-size: 10px;
  font-weight: 600;
}

@keyframes agm-chart-pulse {
  0% { opacity: 1; transform: scale(.8); }
  100% { opacity: 0; transform: scale(2.3); }
}

@keyframes agm-chart-live {
  50% { opacity: .45; }
}

@media (max-width: 900px) {
  .agm-gold-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .agm-gold-widget .agm-gold-quick.agm-gold-chart--hero {
    display: block;
  }
}

@media (max-width: 700px) {
  .agm-gold-chart {
    padding: 17px 13px;
    margin-top: 24px;
    border-radius: 19px;
  }

  .agm-gold-chart--hero { margin-top: 5px; }

  .agm-gold-chart__header { display: block; }

  .agm-gold-chart__subbar {
    flex-direction: column;
    gap: 9px;
    align-items: stretch;
    margin: 14px 0 9px;
  }

  .agm-gold-chart__icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 15px;
  }

  .agm-gold-chart__icon svg {
    width: 34px;
    height: 34px;
  }

  .agm-gold-chart__live {
    margin-top: 15px;
    text-align: right;
  }

  .agm-gold-chart__live > div { justify-content: flex-start; }

  .agm-gold-chart__tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .agm-gold-chart__tabs button { flex: 1 0 auto; }

  .agm-gold-chart__live-meta {
    justify-content: flex-start;
  }

  .agm-gold-chart__canvas {
    min-height: 230px;
    justify-content: start;
  }

  .agm-gold-chart__canvas svg { min-width: 620px; }
  .agm-gold-chart__stats { grid-template-columns: 1fr; }

  .agm-gold-chart__stats > div {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 12px 5px;
    text-align: right;
  }

  .agm-gold-widget .agm-gold-chart__stats strong {
    justify-content: flex-start;
    font-size: 23px !important;
  }

  .agm-gold-chart__stats > div + div {
    border-top: 1px solid var(--agm-line);
    border-right: 0;
  }
}

@media (max-width: 600px) {
  .agm-gold-summary > div:nth-child(n+3) {
    display: flex !important;
  }

  .agm-gold-summary {
    gap: 9px;
  }

  .agm-gold-summary > div {
    padding: 14px;
  }

  .agm-summary-desktop {
    display: none !important;
  }

  .agm-summary-mobile {
    display: block !important;
  }

  .agm-gold-filters {
    min-width: 0;
  }

  .agm-gold-filters button {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
  }

  .agm-gold-periods {
    overflow: hidden;
  }

  .agm-gold-periods button {
    flex: 1 1 0;
    min-width: 38px;
    padding-right: 6px;
    padding-left: 6px;
    text-align: center;
  }
}

/* Light visual system, aligned with the white Aghsat Market blog. */
.agm-gold-widget {
  --agm-paper: #fbfbfc;
  --agm-card: #fff;
  --agm-ink: #112E62;
  --agm-muted: #687386;
  --agm-line: #e2e5eb;
  --agm-shadow: 0 18px 48px rgba(17, 46, 98, .09);
  background: var(--agm-paper);
}

.agm-gold-hero {
  color: var(--agm-ink);
  background: linear-gradient(135deg, #fffdf8 0%, #f7f9fd 54%, #f1f5fb 100%);
  border-bottom: 1px solid #e8ebf1;
}

.agm-gold-hero::before {
  border-color: rgba(197, 156, 78, .2);
  box-shadow: 0 0 0 70px rgba(197, 156, 78, .045), 0 0 0 145px rgba(17, 46, 98, .025);
}

.agm-gold-hero h1 {
  color: var(--agm-navy);
}

.agm-gold-hero__copy > p {
  color: #647084;
}

.agm-gold-seo-updated {
  color: #8b661e;
  background: rgba(197, 156, 78, .1);
  border-color: rgba(197, 156, 78, .26);
}

.agm-gold-chart--hero {
  background: rgba(255, 255, 255, .96);
  border-color: #dde2ea;
  box-shadow: 0 24px 65px rgba(17, 46, 98, .12);
}

.agm-gold-theme {
  color: var(--agm-navy);
  -webkit-text-fill-color: var(--agm-navy);
  background: #fff;
  border-color: #dce2eb;
  box-shadow: 0 9px 24px rgba(17, 46, 98, .12);
}

.agm-gold-theme:hover,
.agm-gold-theme:focus-visible {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: var(--agm-navy);
  border-color: var(--agm-navy);
}

.agm-gold-summary > div {
  border-color: #e1e5ec;
  box-shadow: 0 12px 34px rgba(17, 46, 98, .08);
}

.agm-gold-card {
  border-color: #e1e5ec;
  box-shadow: 0 8px 24px rgba(17, 46, 98, .045);
}

.agm-gold-widget.is-dark {
  --agm-paper: #08162f;
  --agm-card: #10254a;
  --agm-ink: #f7f8fc;
  --agm-muted: #a9b4c8;
  --agm-line: #29446e;
  --agm-shadow: 0 16px 44px rgba(0, 0, 0, .28);
}

.agm-gold-widget.is-dark .agm-gold-hero {
  color: #fff;
  background: linear-gradient(135deg, #112E62 0%, #0b2148 100%);
  border-bottom-color: #1d3b6b;
}

.agm-gold-widget.is-dark .agm-gold-hero h1 {
  color: #fff;
}

.agm-gold-widget.is-dark .agm-gold-hero__copy > p {
  color: #aeb9c7;
}

.agm-gold-widget.is-dark .agm-gold-seo-updated {
  color: #e2c47f;
  background: rgba(197, 156, 78, .1);
  border-color: rgba(197, 156, 78, .22);
}

.agm-gold-widget.is-dark .agm-gold-chart--hero {
  background: var(--agm-card);
  border-color: var(--agm-line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.agm-gold-widget.is-dark .agm-gold-summary > div,
.agm-gold-widget.is-dark .agm-gold-card {
  border-color: var(--agm-line);
  box-shadow: var(--agm-shadow);
}

.agm-gold-widget.is-dark .agm-gold-theme {
  color: #fff;
  -webkit-text-fill-color: #fff;
  background: #5A80F5;
  border-color: #7295f7;
}

/* Direction-safe percentages and calmer time-filter typography. */
.agm-gold-chart__change bdi,
.agm-gold-chart__stats strong bdi,
.agm-gold-card__bottom > span bdi {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  white-space: nowrap;
}

.agm-gold-widget .agm-gold-chart__stats strong:not(.is-up):not(.is-down),
.agm-gold-widget .agm-gold-chart__stats strong:not(.is-up):not(.is-down) .agm-gold-chart__number,
.agm-gold-widget .agm-gold-chart__stats strong:not(.is-up):not(.is-down) .agm-gold-chart__currency {
  color: var(--agm-ink) !important;
  -webkit-text-fill-color: var(--agm-ink) !important;
}

.agm-gold-widget .agm-gold-chart__tabs button,
.agm-gold-widget .agm-gold-periods button {
  font-weight: 400 !important;
}

.agm-gold-widget .agm-gold-chart__tabs button.is-active,
.agm-gold-widget .agm-gold-periods button.is-active {
  font-weight: 600 !important;
}

.agm-gold-widget.is-dark .agm-gold-chart__ounce {
  color: #a9b4c8;
  background: rgba(90, 128, 245, .11);
  border-color: rgba(90, 128, 245, .2);
}

.agm-gold-widget.is-dark .agm-gold-chart__ounce strong {
  color: #fff;
}
