﻿/* ============================================================
   calculator-incub.css
   Калькулятор ВЫВОДА + общие стили
   ============================================================ */

.incubator-calc {
  --calc-primary: #013152;
  --calc-primary-light: #0a4a73;
  --calc-bg: #f5f7fa;
  --calc-card-bg: #ffffff;
  --calc-text: #2d3748;
  --calc-text-light: #718096;
  --calc-border: #e2e8f0;
  --calc-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  --calc-radius: 12px;
  --calc-transition: 0.2s ease;
  --calc-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --calc-white: #ffffff;
  --calc-accent: #ea5b1f;
  background-color: var(--calc-bg);
  padding: 10px;
  margin-bottom: 20px;
  font-family: var(--calc-font);
}

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

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

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

/* ============ Поля формы ============ */
.incubator-calc__field {
  margin-bottom: 20px;
}
.incubator-calc__label {
  display: block;
  font-weight: 600;
  color: var(--calc-text);
  margin-bottom: 6px;
  font-size: 15px;
}
.incubator-calc__select,
.incubator-calc__input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--calc-border);
  border-radius: 8px;
  font-size: 16px;
  background-color: #fafbfc;
  color: var(--calc-text);
  transition: border-color var(--calc-transition), box-shadow var(--calc-transition);
  appearance: none;
  -webkit-appearance: none;
}
.incubator-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;
}
.incubator-calc__select:focus,
.incubator-calc__input:focus {
  outline: none;
  border-color: var(--calc-primary);
  box-shadow: 0 0 0 3px rgba(1, 49, 82, 0.15);
}

/* ============ Результат ============ */
.incubator-calc__result {
  margin-top: 25px;
  display: none;
  animation: incubator-calc-fadeIn 0.4s ease;
}
@keyframes incubator-calc-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.incubator-calc__result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.incubator-calc__result-header h3 {
  font-size: 20px;
  color: var(--calc-primary);
  margin: 0;
}
.incubator-calc__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.incubator-calc__action-btn {
  background: none;
  border: 1px solid var(--calc-border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  color: var(--calc-text-light);
  transition: all var(--calc-transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.incubator-calc__action-btn:hover {
  background: #f0f4f8;
  border-color: #cbd5e0;
  color: var(--calc-text);
}
.incubator-calc__action-btn i {
  font-size: 16px;
}
.incubator-calc__save-history-btn {
  border-color: #f1c40f;
  color: #b7950b;
}
.incubator-calc__save-history-btn:hover {
  background: #fef9e7;
  border-color: #f39c12;
  color: #7d6608;
}
.incubator-calc__result-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.incubator-calc__result-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--calc-border);
  font-size: 15px;
}
#incubator-calc-list span {
  max-width: 200px;
}
.incubator-calc__result-item:last-child {
  border-bottom: none;
}
.incubator-calc__result-date {
  margin-left: auto;
  font-weight: 600;
  color: var(--calc-primary);
  background: #e6f0f7;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: normal;
  text-align: right;
  line-height: 1.3;
}
.incubator-calc__notice {
  margin-top: 12px;
  font-size: 14px;
  color: var(--calc-text-light);
  background: #f8fafc;
  padding: 10px 14px;
  border-radius: 8px;
  border-left: 4px solid var(--calc-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.incubator-calc__notice .incubator-calc__icon {
  width: auto;
  margin-right: 0;
  font-size: 14px;
  color: var(--calc-primary);
}
.incubator-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;
}
.incubator-calc__disclaimer i {
  color: #f39c12;
  font-size: 16px;
  margin-top: 1px;
}
.incubator-calc__product-link-container {
  margin-top: 15px;
  text-align: right;
}
.incubator-calc__product-link {
  display: inline-block;
  background: #ea5b1f;
  color: var(--calc-white);
  border: 2px solid #ea5b1f;
  padding: 10px 20px ;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: background-color var(--calc-transition), border-color var(--calc-transition);
}
.incubator-calc__product-link:hover {
  color: var(--white);
  text-decoration: none;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgb(221 0 23 / 40%);
}
.incubator-calc__icon {
  width: 28px;
  margin-right: 8px;
  font-size: 19px;
  text-align: center;
  color: var(--calc-primary);
  flex-shrink: 0;
}
.incubator-calc__info-heading {
  font-size: 20px;
  font-weight: 600;
  color: var(--calc-primary);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.incubator-calc__info-section {
  margin-bottom: 25px;
}
.incubator-calc__info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.incubator-calc__info-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--calc-text);
}
.incubator-calc__info-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--calc-primary);
}
.incubator-calc__history-container {
  margin-top: 20px;
  border-top: 1px solid var(--calc-border);
  padding-top: 15px;
}
.incubator-calc__history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}
.incubator-calc__history-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--calc-primary);
  margin: 0;
}
.incubator-calc__history-header > div {
  display: flex;
  gap: 6px;
  align-items: center;
}
.incubator-calc__clear-history-btn {
  background: none;
  border: none;
  color: var(--calc-text-light);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all var(--calc-transition);
}
.incubator-calc__clear-history-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
}
.incubator-calc__export-history-btn {
  background: none;
  border: 1px solid var(--calc-border);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
  color: var(--calc-text-light);
  transition: all var(--calc-transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
}
.incubator-calc__export-history-btn:hover {
  background: #f0f4f8;
  border-color: #cbd5e0;
  color: var(--calc-text);
}
/* Стили для списка истории */
.incubator-calc__history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
}
.incubator-calc__history-item {
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.incubator-calc__history-item .history-info {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}
.incubator-calc__history-item .history-bird {
  font-weight: 600;
}
.incubator-calc__history-item .history-date {
  color: var(--calc-text-light);
  font-size: 12px;
}
.incubator-calc__history-item .history-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
/* Кнопка удаления отдельной записи */
.incubator-calc__delete-history-btn {
  background: none;
  border: none;
  color: var(--calc-text-light);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all var(--calc-transition);
  line-height: 1;
}
.incubator-calc__delete-history-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
}
.incubator-calc__history-empty {
  color: var(--calc-text-light);
  font-size: 14px;
  text-align: center;
  padding: 10px 0;
}

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