/* Page-level fix */

/* Notice box */

.sc-notice {
  margin: 0 0 28px 0;
  padding: 14px 18px;
  border: 1px solid #d4e5f7;
  background: #f0f7ff;
  border-radius: 12px;
  font-size: 14px;
  color: #292d40;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
  max-width: 820px;
}

.sc-notice__icon {
  font-size: 18px;
  flex-shrink: 0;
  color: var(--accent-color);
}

.sc-notice a {
  color: #292d40;
  font-weight: 600;
  text-decoration: none;
}

.sc-notice a:hover {
  color: var(--accent-color);
}

.sc-notice--bottom {
  margin: 24px 0 0;
}

.sc-calc {
  width: 100%;
  max-width: 820px;
}

/* Steps */

.sc-step {
  display: flex;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid #edf0f5;
  transition: opacity 0.25s;
}

.sc-step--disabled {
  opacity: 0.35;
  pointer-events: none;
}

.sc-step__number {
  flex: 0 0 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #292d40;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: 50%;
}

.sc-step__body {
  flex: 1 1 auto;
  min-width: 0;
}

.sc-step__label {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 600;
  color: #292d40;
  line-height: 36px;
}

/* Metal sub-selection */

.sc-metal-sub {
  margin-top: 16px;
}

.sc-step__sublabel {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 500;
  color: #292d40;
}

/* Toggle buttons (panel type) */

.sc-toggle {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.sc-toggle__btn {
  flex: 1 1 160px;
  max-width: 220px;
  padding: 12px 20px 12px 38px;
  border: 2px solid #e0e3ea;
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: #292d40;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  text-align: center;
  position: relative;
}

.sc-toggle__btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #cdd1da;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.sc-toggle__btn--active::before {
  border-color: var(--accent-color);
  border-width: 5px;
}

.sc-toggle__btn:hover {
  border-color: var(--accent-color);
}

.sc-toggle__btn--active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color);
  color: #292d40;
}

/* Toggle buttons with images */

.sc-toggle__btn--img {
  flex: 1 1 200px;
  max-width: 280px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.sc-toggle__btn--img::before {
  top: 10px;
  left: 10px;
  transform: none;
}

.sc-toggle__img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 12px;
}

.sc-toggle__text {
  font-size: 15px;
  font-weight: 600;
}

.sc-toggle__hint {
  font-size: 12px;
  font-weight: 400;
  color: #7a7a7a;
}

/* Select */

.sc-select {
  display: block;
  width: 280px;
  max-width: 100%;
  padding: 12px 36px 12px 20px;
  border: 2px solid #e0e3ea;
  border-radius: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23292d40'/%3E%3C/svg%3E") no-repeat right 14px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-size: 16px;
  color: #292d40;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sc-select:focus {
  outline: none;
}

/* Cards (base type) */

.sc-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.sc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px 16px;
  border: 2px solid #e0e3ea;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
  position: relative;
}

.sc-card::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #cdd1da;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.sc-card--active::before {
  border-color: var(--accent-color);
  border-width: 5px;
}

.sc-card:hover {
  border-color: var(--accent-color);
}

.sc-card--active {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color);
}

.sc-card__img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
}

.sc-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #292d40;
}

.sc-card__hint {
  font-size: 12px;
  font-weight: 400;
  color: #7a7a7a;
  line-height: 1.3;
}

/* Quantity fields */

.sc-qty-fields {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.sc-qty-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sc-qty-field__label {
  font-size: 13px;
  font-weight: 600;
  color: #7a7a7a;
  white-space: nowrap;
}

.sc-qty-field__input {
  width: 180px;
  max-width: 100%;
  padding: 12px 20px;
  border: 2px solid #e0e3ea;
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
  color: #292d40;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.sc-qty-field__input:focus {
  outline: none;
}

/* Calculate button */

.sc-calc-btn {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 40px;
  border: none;
  border-radius: 12px;
  background: var(--accent-color);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.2s;
}

.sc-calc-btn:hover {
  background: #f76700;
}

.sc-calc-btn__icon {
  height: 22px;
  width: 22px;
}

/* Quantity result block */

.sc-results__qty {
  margin: 24px 0 0;
  padding: 18px 24px;
  background: #f0f7ff;
  border: 1px solid #d4e5f7;
  border-radius: 12px;
  line-height: 1.5;
  color: #292d40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sc-results__qty-left {
  flex: 1;
}

.sc-results__qty-main {
  font-size: 20px;
}

.sc-results__qty-detail {
  margin-top: 4px;
  font-size: 15px;
  color: #7a7a7a;
}

.sc-results__qty-request {
  flex-shrink: 0;
  padding: 12px 28px;
  border: none;
  border-radius: 10px;
  background: var(--accent-color);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.sc-results__qty-request:hover {
  background: #f76700;
}

/* Basis block */

.sc-results__basis {
  margin-top: 16px;
  padding: 14px 18px;
  background: #fafbfc;
  border: 1px solid #edf0f5;
  border-radius: 10px;
}

.sc-results__basis-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #292d40;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sc-results__basis-text {
  margin: 0;
  font-size: 13px;
  color: #7a7a7a;
  line-height: 1.5;
}

.sc-basis-list {
  margin: 0;
  padding: 0 0 0 18px;
  list-style: disc;
}

.sc-basis-list li {
  margin-bottom: 4px;
}

.sc-basis-list a {
  color: #292d40;
  font-weight: 600;
  text-decoration: none;
}

.sc-basis-list a:hover {
  color: var(--accent-color);
}

/* PDF buttons */

.sc-pdf-buttons {
  display: flex;
  gap: 10px;
}

.sc-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #dde1ea;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #292d40;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
}

.sc-pdf-btn:hover {
  border-color: var(--accent-color);
  background: #fdf6f0;
}

.sc-pdf-btn img {
  width: 18px;
  height: 18px;
}

/* PDF modal */

.sc-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sc-modal__backdrop {
  position: absolute;
  inset: 0;
}

.sc-modal__content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.sc-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.sc-modal__close:hover {
  opacity: 1;
}

.sc-modal__close img {
  width: 16px;
  height: 16px;
}

.sc-modal__title {
  font-size: 20px;
  font-weight: 700;
  color: #292d40;
  margin: 0 0 20px;
}

.sc-modal__field {
  margin-bottom: 16px;
}

.sc-modal__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #292d40;
  margin-bottom: 6px;
}

.sc-modal__label-hint {
  font-weight: 400;
  color: #aab0bc;
}

.sc-modal__input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #dde1ea;
  border-radius: 8px;
  font-size: 14px;
  color: #292d40;
  box-sizing: border-box;
}

.sc-modal__input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.sc-modal__error {
  margin: 4px 0 0;
  font-size: 12px;
  color: #c65100;
}

.sc-modal__buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.sc-modal__btn {
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
}

.sc-modal__btn--cancel {
  background: #f0f1f5;
  color: #292d40;
}

.sc-modal__btn--cancel:hover {
  background: #e4e6ec;
}

.sc-modal__btn--ok {
  background: var(--accent-color);
  color: #fff;
}

.sc-modal__btn--ok:hover {
  opacity: 0.9;
}

.sc-modal__policy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}

.sc-modal__policy a {
  color: #292d40;
  font-weight: 600;
  text-decoration: underline;
}

.sc-modal__policy a:hover {
  color: var(--accent-color);
}

.sc-modal__checkbox {
  margin-top: 2px;
  accent-color: var(--accent-color);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.sc-modal__textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #dde1ea;
  border-radius: 8px;
  font-size: 14px;
  color: #292d40;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
}

.sc-modal__textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

.sc-modal__promise {
  margin: 16px 0 0;
  font-size: 13px;
  color: #9a9fad;
  text-align: center;
}

.sc-modal__success {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: #e8f5e9;
  border-radius: 8px;
  color: #2e7d32;
  font-size: 14px;
  text-align: center;
}

/* Results */

.sc-results {
  margin-top: 32px;
  padding: 28px;
  border: 1px solid #edf0f5;
  border-radius: 16px;
  background: #fff;
}

.sc-results__header {
  margin-bottom: 20px;
}

.sc-results__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sc-results__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #292d40;
}

.sc-results__summary {
  margin: 0;
  font-size: 15px;
  color: #7a7a7a;
  line-height: 1.35;
}

.sc-results__warning {
  margin-top: 20px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid #ffd2a8;
  background: #fff6ed;
  color: #c65100;
  border-radius: 10px;
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  line-height: 1.4;
}

.sc-results__warning-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.sc-results__warning a {
  color: #c65100;
  font-weight: 600;
  text-decoration: none;
}

.sc-results__warning a:hover {
  text-decoration: underline;
}

.sc-results__empty {
  font-size: 15px;
  color: #7a7a7a;
  line-height: 1.4;
}

.sc-results__empty a {
  color: var(--accent-color);
}

/* Product cards in results */

.sc-results__products {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sc-product {
  display: flex;
  gap: 20px;
  padding: 20px;
  border: 1px solid #edf0f5;
  border-radius: 14px;
  background: #fafbfc;
  align-items: center;
}

.sc-product__img-link {
  flex-shrink: 0;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  transition: opacity 0.2s;
}

.sc-product__img-link:hover {
  opacity: 0.85;
}

.sc-product__img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  display: block;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  box-sizing: border-box;
}

.sc-product__info {
  flex: 1 1 auto;
  min-width: 0;
}

.sc-product__label {
  font-size: 13px;
  font-weight: 400;
  color: #9a9fad;
}

.sc-product__series {
  font-size: 15px;
  color: #292d40;
  margin-bottom: 6px;
  font-weight: 600;
}

.sc-product__series a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

.sc-product__series a:hover {
  text-decoration: underline;
}

.sc-product__article {
  font-size: 18px;
  font-weight: 700;
  color: #292d40;
  margin-bottom: 12px;
}

.sc-product__article a {
  color: #292d40;
  text-decoration: none;
}

.sc-product__article a:hover {
  color: var(--accent-color);
}

.sc-product__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.sc-product__spec {
  font-size: 14px;
  color: #292d40;
  line-height: 1.5;
}

.sc-product__spec--tfix {
  position: relative;
}

.sc-product__tooltip-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e0e3ea;
  color: #292d40;
  font-size: 11px;
  font-weight: 700;
  cursor: help;
  vertical-align: middle;
  margin-left: 2px;
  position: relative;
}

.sc-product__tooltip-box {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  padding: 10px 14px;
  background: #292d40;
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  border-radius: 10px;
  z-index: 10;
  pointer-events: none;
  text-align: left;
}

.sc-product__tooltip-box::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #292d40;
}

.sc-product__tooltip-trigger:hover .sc-product__tooltip-box {
  display: block;
}

/* Request form */

.sc-request {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #edf0f5;
}

.sc-request__title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: #292d40;
}

.sc-request__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.sc-request__field--wide {
  grid-column: 1 / -1;
}

.sc-request__label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #7a7a7a;
}

.sc-request__input,
.sc-request__textarea {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: 2px solid #e0e3ea;
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  color: #292d40;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.sc-request__input:focus,
.sc-request__textarea:focus {
  outline: none;
}

.sc-request__textarea {
  resize: vertical;
  min-height: 60px;
}

.sc-request__submit {
  margin-top: 16px;
  padding: 13px 36px;
  border: none;
  border-radius: 12px;
  background: var(--accent-color);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.sc-request__submit:hover {
  opacity: 0.88;
}

.sc-request__promise {
  margin: 10px 0 0;
  font-size: 13px;
  color: #7a7a7a;
  line-height: 1.3;
}

.sc-request__success {
  margin-top: 12px;
  padding: 12px 16px;
  background: #e8f8ee;
  border: 1px solid #a3e4b8;
  border-radius: 10px;
  color: #1a7a3a;
  font-size: 15px;
  font-weight: 600;
}

/* Mobile */

@media (max-width: 640px) {
  .sc-calc {
    max-width: 100%;
  }

  .sc-notice {
    max-width: 100%;
  }

  .sc-step {
    gap: 12px;
  }

  .sc-step__number {
    flex: 0 0 30px;
    height: 30px;
    font-size: 14px;
  }

  .sc-toggle__btn {
    flex: 1 1 120px;
    padding: 10px 10px 10px 34px;
    font-size: 14px;
  }

  .sc-toggle__btn--img {
    flex: 1 1 140px;
    max-width: none;
    padding: 12px 10px;
  }

  .sc-toggle__img {
    width: 60px;
    height: 60px;
  }

  .sc-select {
    width: 100%;
  }

  .sc-cards {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .sc-card {
    padding: 12px 8px;
  }

  .sc-card__img {
    width: 44px;
    height: 44px;
  }

  .sc-qty-fields {
    flex-direction: column;
  }

  .sc-qty-field__input {
    width: 100%;
  }

  .sc-calc-btn {
    width: 100%;
    padding: 13px 20px;
    font-size: 16px;
    box-sizing: border-box;
  }

  .sc-results {
    padding: 18px 14px;
    border-radius: 12px;
  }

  .sc-results__title {
    font-size: 20px;
  }

  .sc-product {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 16px 12px;
  }

  .sc-product__img {
    width: 120px;
    height: 120px;
  }

  .sc-product__article {
    font-size: 16px;
  }

  .sc-product__specs {
    justify-content: center;
  }

  .sc-product__tooltip-box {
    left: auto;
    right: -10px;
    transform: none;
    width: 220px;
  }

  .sc-product__tooltip-box::before {
    left: auto;
    right: 16px;
    transform: none;
  }

  .sc-results__qty {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .sc-results__qty-main {
    font-size: 17px;
  }

  .sc-results__qty-request {
    text-align: center;
  }

  .sc-results__warning {
    font-size: 13px;
  }

  .sc-results__header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .sc-pdf-btn--print {
    display: none;
  }

  .sc-modal__content {
    margin: 16px;
    padding: 24px 20px;
    max-width: calc(100% - 32px);
    box-sizing: border-box;
  }

  .sc-modal__title {
    font-size: 18px;
  }

  .sc-modal__buttons {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .sc-modal__btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }
}

@media (max-width: 400px) {
  .sc-cards {
    grid-template-columns: 1fr;
  }

  .sc-toggle__btn {
    flex: 1 1 100%;
    max-width: none;
  }

  .sc-toggle__btn--img {
    flex: 1 1 100%;
  }
}
