/* ============================================================
   calculator-cost.css
   Калькулятор СЕБЕСТОИМОСТИ ЯЙЦА — автономные стили
   Шрифт: PT Sans + системный fallback для ₽ (U+20BD)
   Префикс: .cost-calc
   ============================================================ */

/* Подставляем системный шрифт ТОЛЬКО для символа ₽.
   Google-версия PT Sans не содержит U+20BD — поэтому в чистом виде
   знак рубля в ней показывается квадратиком. */
@font-face {
  font-family: 'RubleLocal';
  src:
    local('PT Sans'),
    local('Roboto'),
    local('Calibri'),
    local('Segoe UI'),
    local('Arial'),
    local('Helvetica Neue'),
    local('Noto Sans'),
    local('DejaVu Sans');
  unicode-range: U+20BD;
}

.cost-calc {
  --cost-primary: #5c3d99;
  --cost-primary-dark: #432b73;
  --cost-bg: #f5f7fa;
  --cost-card-bg: #ffffff;
  --cost-text: #2d3748;
  --cost-text-light: #718096;
  --cost-border: #e2e8f0;
  --cost-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --cost-radius: 12px;
  --cost-transition: 0.2s ease;
  --cost-font: 'PT Sans', 'RubleLocal', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --cost-white: #ffffff;
  --cost-accent: #ea5b1f;
  --cost-success: #2f8f4e;
  --cost-danger: #b91c1c;

  background-color: var(--cost-bg);
  padding: 10px;
  margin-bottom: 20px;
  font-family: var(--cost-font);
}

.cost-calc * { box-sizing: border-box; }

/* ============ SEO-блок ============ */
.cost-calc__seo-block {
  background: var(--cost-card-bg);
  border-radius: var(--cost-radius);
  box-shadow: var(--cost-shadow);
  max-width: 1200px;
  margin: 0 auto 10px;
  padding: 24px 30px;
}
.cost-calc__seo-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--cost-primary-dark);
  margin: 0 0 10px;
}
.cost-calc__seo-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--cost-text);
  margin: 0;
}

/* ============ Layout ============ */
.cost-calc__main {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
}
.cost-calc__card {
  background: var(--cost-card-bg);
  border-radius: var(--cost-radius);
  box-shadow: var(--cost-shadow);
  flex: 1 1 380px;
  min-width: 0;
  max-width: 560px;
  padding: 30px;
  transition: box-shadow var(--cost-transition);
}
.cost-calc__card:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }
.cost-calc__info-panel {
  background: var(--cost-card-bg);
  border-radius: var(--cost-radius);
  box-shadow: var(--cost-shadow);
  flex: 1 1 420px;
  max-width: 610px;
  padding: 30px;
  transition: box-shadow var(--cost-transition);
}
.cost-calc__info-panel:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }

/* ============ Поля ============ */
.cost-calc__field { margin-bottom: 18px; }
.cost-calc__label {
  display: block;
  font-weight: 600;
  color: var(--cost-text);
  margin-bottom: 6px;
  font-size: 14px;
}
.cost-calc__select,
.cost-calc__input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--cost-border);
  border-radius: 8px;
  font-size: 15px;
  background-color: #fafbfc;
  color: var(--cost-text);
  transition: border-color var(--cost-transition), box-shadow var(--cost-transition);
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}
.cost-calc__select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}
.cost-calc__select:focus,
.cost-calc__input:focus {
  outline: none;
  border-color: var(--cost-primary);
  box-shadow: 0 0 0 3px rgba(92, 61, 153, 0.15);
}

.cost-calc__row {
  display: flex;
  gap: 12px;
}
.cost-calc__row > * { flex: 1 1 0; min-width: 0; }

.cost-calc__group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--cost-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 22px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--cost-border);
}
.cost-calc__group-title:first-of-type { margin-top: 0; }

/* ============ Результат ============ */
.cost-calc__result {
  margin-top: 25px;
  display: none;
  animation: cost-calc-fadeIn 0.4s ease;
}
@keyframes cost-calc-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cost-calc__result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.cost-calc__result-header h3 {
  font-size: 20px;
  color: var(--cost-primary-dark);
  margin: 0;
}
.cost-calc__result-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cost-calc__result-item {
  display: flex;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--cost-border);
  font-size: 15px;
}
.cost-calc__result-item > span:not(.cost-calc__result-value) {
  max-width: 240px;
}
.cost-calc__result-item:last-child { border-bottom: none; }
.cost-calc__result-value {
  margin-left: auto;
  font-weight: 600;
  color: var(--cost-primary-dark);
  background: #ebe4f6;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
  text-align: right;
  line-height: 1.3;
}

.cost-calc__result-item--main {
  background: #ebe4f6;
  margin: 0 -12px;
  padding: 14px 12px;
  border-radius: 8px;
  border-bottom: none;
  font-weight: 600;
}
.cost-calc__result-item--main .cost-calc__result-value {
  background: var(--cost-primary);
  color: #fff;
  font-size: 16px;
  padding: 6px 14px;
}

.cost-calc__result-item--good {
  background: #e8f5ec;
  margin: 0 -12px;
  padding: 12px;
  border-radius: 8px;
  border-bottom: none;
  color: #1e6b3a;
  font-weight: 600;
}
.cost-calc__result-item--good .cost-calc__icon { color: #2f8f4e; }
.cost-calc__result-item--good .cost-calc__result-value {
  background: var(--cost-success); color: #fff;
}

.cost-calc__result-item--bad {
  background: #fee2e2;
  margin: 0 -12px;
  padding: 12px;
  border-radius: 8px;
  border-bottom: none;
  color: var(--cost-danger);
  font-weight: 600;
}
.cost-calc__result-item--bad .cost-calc__icon { color: var(--cost-danger); }
.cost-calc__result-item--bad .cost-calc__result-value {
  background: #fecaca; color: #7f1d1d;
}

.cost-calc__result-item--hint { opacity: .85; font-size: 14px; }
.cost-calc__result-item--hint .cost-calc__icon { color: var(--cost-text-light); }

/* ============ Иконки ============ */
.cost-calc__icon {
  width: 28px;
  margin-right: 8px;
  font-size: 19px;
  text-align: center;
  color: var(--cost-primary);
  flex-shrink: 0;
}

/* ============ Кнопки ============ */
.cost-calc__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.cost-calc__action-btn {
  background: none;
  border: 1px solid var(--cost-border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  color: var(--cost-text-light);
  transition: all var(--cost-transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.cost-calc__action-btn:hover {
  background: #f0f4f8;
  border-color: #cbd5e0;
  color: var(--cost-text);
}
.cost-calc__action-btn i { font-size: 16px; }

/* ============ Примечания ============ */
.cost-calc__notice {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--cost-text-light);
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 4px solid var(--cost-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cost-calc__disclaimer {
  margin: 10px 0 20px;
  font-size: 13px;
  color: #6b7a8a;
  background: #fef9e7;
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 4px solid #f1c40f;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

/* ============ CTA ============ */
.cost-calc__product-link-container {
  margin-top: 15px;
  text-align: right;
}
.cost-calc__product-link {
  display: inline-block;
  background: var(--cost-accent);
  color: var(--cost-white);
  border: 2px solid var(--cost-accent);
  padding: 10px 20px ;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: background-color var(--cost-transition), border-color var(--cost-transition);
}
.cost-calc__product-link:hover {
  color: #fff;
  text-decoration: none;
  background: #dd0017;
  border-color: #dd0017;
  box-shadow: 0 4px 12px rgba(221, 0, 23, 0.4);
}

/* ============ Инфо-панель ============ */
.cost-calc__info-heading {
  font-size: 20px;
  font-weight: 600;
  color: var(--cost-primary-dark);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cost-calc__info-section { margin-bottom: 25px; }
.cost-calc__info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cost-calc__info-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--cost-text);
}
.cost-calc__info-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--cost-primary);
}

/* ============ Адаптив ============ */
@media (max-width: 900px) {
  .cost-calc__main { flex-direction: column; align-items: center; gap: 20px; }
  .cost-calc__card { flex: 1 1 auto; width: 100%; max-width: 100%; padding: 20px; }
  .cost-calc__info-panel { flex: 1 1 auto; width: 100%; max-width: 100%; padding: 20px; }
  .cost-calc__seo-block { padding: 20px; }
  .cost-calc__actions { flex-direction: column; align-items: stretch; }
  .cost-calc__row { flex-direction: column; gap: 0; }
}