.lpl-price-chart,
.lpl-price-chart * {
  box-sizing: border-box;
}

.lpl-price-chart {
  --lpl-price-chart-surface: #ffffff;
  --lpl-price-chart-border: #e5e7eb;
  --lpl-price-chart-muted: #6b7280;
  --lpl-price-chart-text: #111827;
  --lpl-price-chart-overlay: rgba(15, 23, 42, 0.58);
  --lpl-price-chart-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
  display: block;
  width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
  clear: both;
  margin-top: 18px;
  font: inherit;
  color: var(--lpl-price-chart-text);
  direction: rtl;
}

.lpl-price-chart [hidden] {
  display: none !important;
}

.lpl-price-chart__trigger,
.lpl-price-chart__close,
.lpl-price-chart__select {
  font: inherit;
}

.lpl-price-chart__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 20px;
  border: 1px solid var(--lpl-price-chart-border);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--lpl-price-chart-text);
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
  text-decoration: none;
  box-shadow: none;
}

.lpl-price-chart__trigger:hover,
.lpl-price-chart__trigger:focus {
  background: #eef2f7;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  outline: none;
}

.lpl-price-chart__trigger img {
  display: block;
  width: 18px;
  height: 18px;
}

.lpl-price-chart__modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--lpl-price-chart-overlay);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

.lpl-price-chart__modal.is-open {
  opacity: 1;
  visibility: visible;
}

.lpl-price-chart__dialog {
  width: min(100%, 920px);
  max-height: min(88vh, 860px);
  overflow: auto;
  border-radius: 24px;
  background: var(--lpl-price-chart-surface);
  box-shadow: var(--lpl-price-chart-shadow);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.22s ease;
}

.lpl-price-chart__modal.is-open .lpl-price-chart__dialog {
  transform: translateY(0) scale(1);
}

.lpl-price-chart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid var(--lpl-price-chart-border);
}

.lpl-price-chart__product-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.lpl-price-chart__product-image {
  width: 65px;
  min-width: 65px;
  height: 65px;
  border-radius: 18px;
  object-fit: cover;
}

.lpl-price-chart__eyebrow,
.lpl-price-chart__product-title {
  margin: 0;
}

.lpl-price-chart__eyebrow {
  font-size: 16px;
  font-weight: 700;
  color: var(--lpl-price-chart-text);
}

.lpl-price-chart__product-title {
  color: var(--lpl-price-chart-muted);
  font-size: 14px;
}

.lpl-price-chart__close {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0 !important;
  border: 0;
  border-radius: 14px !important;
  background: #eef2f7;
  color: var(--lpl-price-chart-text) !important;
  cursor: pointer !important;
  font-size: 25px !important;
  line-height: 1 !important;
}

.lpl-price-chart__content {
  padding: 24px;
}

.lpl-price-chart__field {
  margin-bottom: 20px;
}

.lpl-price-chart__label {
  display: block;
  margin-bottom: 8px;
  color: var(--lpl-price-chart-text);
  font-size: 14px;
  font-weight: 600;
}

.lpl-price-chart__select-wrap {
  position: relative;
}

.lpl-price-chart__select {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--lpl-price-chart-border);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--lpl-price-chart-text);
  box-shadow: none;
}

.lpl-price-chart__select-trigger {
  position: relative;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  padding-left: 42px;
  border: 1px solid var(--lpl-price-chart-border);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--lpl-price-chart-text);
  text-align: right;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.lpl-price-chart__select-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 16px;
  width: 10px;
  height: 6px;
  transform: translateY(-50%);
  transition: transform 0.18s ease;
  background: no-repeat center/contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%236b7280' d='M1.1.6 5 4.5 8.9.6 10 1.7 5 6 .1 1.7z'/%3E%3C/svg%3E");
}

.lpl-price-chart__select-wrap.is-open .lpl-price-chart__select-trigger {
  border-color: #cbd5e1;
  background: #ffffff;
}

.lpl-price-chart__select-wrap.is-open .lpl-price-chart__select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.lpl-price-chart__select-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  z-index: 8;
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--lpl-price-chart-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.lpl-price-chart__select-option {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--lpl-price-chart-text);
  text-align: right;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.lpl-price-chart__select-option:hover,
.lpl-price-chart__select-option:focus,
.lpl-price-chart__select-option.is-active {
  background: #eef4ff;
  color: #1d4ed8;
  outline: none;
}

.lpl-price-chart__card {
  border: 1px solid var(--lpl-price-chart-border);
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.lpl-price-chart__chart-wrap {
  position: relative;
  min-height: 340px;
}

.lpl-price-chart__loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  z-index: 2;
}

.lpl-price-chart__spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--lpl-price-chart-regular);
  border-top-color: transparent;
  border-radius: 999px;
  animation: lpl-price-chart-spin 0.8s linear infinite;
}

.lpl-price-chart__canvas {
  width: 100%;
  height: 340px;
}

.lpl-price-chart__state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--lpl-price-chart-muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.8;
}

.lpl-price-chart__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 18px;
}

.lpl-price-chart__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lpl-price-chart-text);
  font-size: 14px;
  font-weight: 500;
}

.lpl-price-chart__legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.lpl-price-chart__legend-dot--regular {
  background: var(--lpl-price-chart-regular);
}

.lpl-price-chart__legend-dot--sale {
  background: var(--lpl-price-chart-sale);
}

@keyframes lpl-price-chart-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 767px) {
  .lpl-price-chart__close {
    font-size: 20px !important;
  }
  .lpl-price-chart__modal {
    padding: 14px;
  }

  .lpl-price-chart__dialog {
    width: 100%;
    border-radius: 20px;
  }

  .lpl-price-chart__header,
  .lpl-price-chart__content {
    padding: 18px;
  }

  .lpl-price-chart__header {
    align-items: flex-start;
  }

  .lpl-price-chart__product-image {
    width: 60px;
    min-width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .lpl-price-chart__eyebrow {
    font-size: 16px;
  }

  .lpl-price-chart__product-title,
  .lpl-price-chart__legend-item {
    font-size: 13px;
  }

  .lpl-price-chart__chart-wrap,
  .lpl-price-chart__canvas {
    min-height: 280px;
    height: 280px;
  }
}
