/* ===== Пеня и неустойка: красная схема «тревоги» ===== */

.calculator-layout {
  display: flex;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 40px auto;
  gap: 30px;
  padding: 0 20px;
}

.calculator-left,
.calculator-right {
  flex: 1;
  min-width: 300px;
}

/* 📛 Блок ввода — красная рамка-«предупреждение» */
.calc-block {
  background: #fff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  border: 2px solid #dc3545;
  position: relative;
}

.calc-block::before {
  content: '⚠';
  position: absolute;
  top: -14px;
  right: 18px;
  font-size: 26px;
  background: #fff;
  padding: 0 6px;
  line-height: 1;
}

.calc-block h1 {
  margin-top: 0;
  font-size: 1.5rem;
  color: #b02a37;
}

.calc-block label {
  display: block;
  margin-top: 16px;
  font-weight: bold;
  font-size: 14px;
  color: #333;
}

.calc-block label .hint {
  font-weight: normal;
  color: #777;
}

.calc-block input[type="text"],
.calc-block input[type="number"],
.calc-block input[type="date"],
.calc-block select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  background: #fff;
  color: #333;
}

.calc-block input:focus,
.calc-block select:focus {
  outline: none;
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

/* 📅 Календарная стилизация — красная палитра дат */
.calc-block input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #dc3545;
  background: #fff8f8;
  cursor: pointer;
}

.calc-block input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(25%) sepia(80%) saturate(3000%) hue-rotate(340deg);
  cursor: pointer;
}

.calc-block input[type="date"]::-webkit-datetime-edit {
  color: #333;
}

.calc-block input[type="date"]:hover {
  border-color: #b02a37;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

/* 🔘 Кнопка расчёта */
.calc-block button {
  margin-top: 22px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #dc3545, #b02a37);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.calc-block button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(220, 53, 69, 0.45);
}

.calc-block button:active {
  transform: translateY(0);
}

/* 📊 Блок результатов — тёмно-красная «сигнализация» */
.result-block {
  background: #fff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  border-top: 4px solid #dc3545;
  align-self: flex-start;
}

.result-block h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: #b02a37;
}

.result-output {
  background-color: #fdf2f2;
  border: 1px solid #f5c2c7;
  border-radius: 10px;
  padding: 1.2rem;
  margin-top: 1rem;
  font-size: 1rem;
  color: #58151c;
  box-shadow: inset 0 1px 3px rgba(176, 42, 55, 0.1);
}

.result-output p {
  margin: 10px 0;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.result-output p.total {
  border-top: 2px dashed #dc3545;
  padding-top: 14px;
  margin-top: 14px;
  font-size: 18px;
  font-weight: bold;
}

.result-output strong {
  color: #b02a37;
  white-space: nowrap;
}

.result-output .error {
  color: #dc3545;
  font-weight: bold;
}

.result-formula {
  margin-top: 12px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #f5c2c7;
  font-size: 13px;
  color: #6f2c33;
}

/* ===== Адаптивность ===== */
@media (max-width: 768px) {
  .calculator-layout {
    padding: 0 12px;
    gap: 20px;
  }
}
