.amaly-product-configurator,
.amaly-product-configurator * {
  box-sizing: border-box;
}

.amaly-product-configurator {
  margin: 18px 0;
  color: #111;
}

.amaly-pc-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid #d6d6d2;
  border-radius: 6px;
  background: #fff;
  color: #111;
  text-align: left;
  cursor: pointer;
}

.amaly-pc-trigger-value,
.amaly-pc-trigger-label {
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0;
}

.amaly-pc-trigger-value {
  font-weight: 500;
}

.amaly-pc-trigger-label {
  justify-self: end;
  white-space: nowrap;
}

.amaly-pc-download-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #e1ded8;
  border-radius: 6px;
  background: #faf8f4;
}

.amaly-pc-download-block[hidden] {
  display: none;
}

.amaly-pc-download-block span {
  font-size: 14px;
  font-weight: 500;
}

.amaly-pc-download-open,
.amaly-pc-submit,
.amaly-pc-download-link,
.amaly-pc-promo a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.amaly-pc-backdrop,
.amaly-pc-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  background: rgba(0, 0, 0, 0.34);
}

.amaly-pc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 2147483646;
  width: min(448px, 100vw);
  height: 100vh;
  overflow-y: auto;
  padding: 26px;
  background: #fff;
  color: #111;
  box-shadow: -18px 0 42px rgba(0, 0, 0, 0.16);
}

.amaly-pc-drawer[hidden],
.amaly-pc-backdrop[hidden],
.amaly-pc-modal[hidden] {
  display: none !important;
}

.amaly-pc-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.amaly-pc-drawer-head p,
.amaly-pc-drawer-head h3 {
  margin: 0;
  letter-spacing: 0;
}

.amaly-pc-drawer-head p {
  color: #6b6862;
  font-size: 13px;
}

.amaly-pc-drawer-head h3 {
  margin-top: 4px;
  font-size: 20px;
  font-weight: 500;
}

.amaly-pc-icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f0ed;
  color: #111;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.amaly-pc-option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.amaly-pc-option {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: #111;
  text-align: left;
  cursor: pointer;
}

.amaly-pc-option.is-active {
  border-bottom-color: #111;
}

.amaly-pc-option.is-active .amaly-pc-option-media {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.amaly-pc-option-media {
  display: block;
  aspect-ratio: 1.28;
  overflow: hidden;
  border-radius: 6px;
  background: #f4f3ef;
}

.amaly-pc-option-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.amaly-pc-option-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, transparent 48%, #dedbd3 49%, #dedbd3 51%, transparent 52%),
    #f4f3ef;
}

.amaly-pc-option-copy {
  display: grid;
  gap: 3px;
}

.amaly-pc-option-copy strong,
.amaly-pc-option-copy span,
.amaly-pc-option-copy small,
.amaly-pc-option-copy em {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.35;
  letter-spacing: 0;
}

.amaly-pc-option-copy strong {
  font-weight: 600;
}

.amaly-pc-option-copy small {
  color: #6b6862;
  font-size: 12px;
}

.amaly-pc-option-copy span {
  color: #3f3d39;
}

.amaly-pc-option-copy em {
  color: #111;
  font-style: normal;
}

.amaly-pc-promo {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin: 4px 0;
  padding: 18px;
  border-radius: 6px;
  background: #f4f0e8;
}

.amaly-pc-promo img {
  display: block;
  width: 100%;
  max-height: 170px;
  border-radius: 5px;
  object-fit: cover;
}

.amaly-pc-promo strong {
  font-size: 15px;
  line-height: 1.35;
}

.amaly-pc-promo p {
  margin: 0;
  color: #333;
  font-size: 13px;
  line-height: 1.45;
}

.amaly-pc-promo a {
  justify-self: start;
  margin-top: 2px;
}

.amaly-pc-modal {
  z-index: 2147483647;
  display: grid;
  place-items: center;
  padding: 18px;
}

.amaly-pc-modal-panel {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.amaly-pc-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.amaly-pc-modal h3 {
  margin: 0 42px 18px 0;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
}

.amaly-pc-download-form {
  display: grid;
  gap: 12px;
}

.amaly-pc-download-form label {
  display: grid;
  gap: 5px;
}

.amaly-pc-download-form label span {
  font-size: 13px;
  font-weight: 500;
}

.amaly-pc-download-form input,
.amaly-pc-download-form select {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #d6d6d2;
  border-radius: 4px;
  background: #fff;
  color: #111;
  font: inherit;
}

.amaly-pc-form-status {
  min-height: 18px;
  margin: 0;
  color: #4d4a44;
  font-size: 13px;
  line-height: 1.4;
}

.amaly-pc-form-status.is-error {
  color: #9a241d;
}

.amaly-pc-form-status.is-success {
  color: #1f6f3f;
}

.amaly-pc-download-link[hidden] {
  display: none;
}

.amaly-pc-lock {
  overflow: hidden;
}

@media (max-width: 540px) {
  .amaly-pc-trigger {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 11px 14px;
  }

  .amaly-pc-trigger-label {
    justify-self: start;
    white-space: normal;
  }

  .amaly-pc-download-block {
    align-items: stretch;
    flex-direction: column;
  }

  .amaly-pc-download-open {
    width: 100%;
  }

  .amaly-pc-drawer {
    width: 100vw;
    padding: 22px 16px 28px;
  }

  .amaly-pc-option-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .amaly-pc-modal-panel {
    padding: 24px 18px;
  }
}
