/* ==== Bresta VentCalc v2.4 — Frontend Style ==== */

/* --- Кольори та базові налаштування --- */
:root {
  --brand: #2563eb;
  --brand-light: #3b82f6;
  --text: #0f172a;
  --bg: #ffffff;
  --muted: #64748b;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(0,0,0,0.08);
}

#bresta-calc {
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  max-width: 900px;
  margin: 20px auto;
  padding: 10px;
  line-height: 1.5;
}

.bv-title {
  text-align: center;
  font-size: 26px;
  color: var(--brand);
  margin-bottom: 20px;
  font-weight: 600;
}

/* --- Карточки --- */
.bv-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.bv-card h3 {
  margin-top: 0;
  color: var(--brand);
  border-bottom: 2px solid var(--brand-light);
  padding-bottom: 6px;
  font-size: 20px;
}

/* --- Поля --- */
.bv-card label {
  display: block;
  margin: 5px 0;
}

.bv-card input,
.bv-card select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  font-size: 15px;
  box-sizing: border-box;
}

.bv-card input:focus,
.bv-card select:focus {
  outline: none;
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}

/* --- Кнопки --- */
.bv-btn {
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 18px;
  margin-top: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
}
.bv-btn:hover {
  background: var(--brand-light);
  transform: translateY(-1px);
}

/* --- Таблиця специфікації --- */
#bv-spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
#bv-spec th {
  background: var(--brand);
  color: #fff;
}
#bv-spec td, #bv-spec th {
  border: 1px solid #e5e7eb;
  padding: 8px;
  text-align: center;
}
#bv-total {
  font-weight: 600;
  color: var(--brand);
}

/* --- Модальне вікно --- */
.bv-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  z-index: 999;
}

.bv-modal-content {
  background: #fff;
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 95%;
  max-width: 400px;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.bv-modal-content h3 {
  color: var(--brand);
  text-align: center;
  margin-top: 0;
}

.bv-modal-content label {
  display: block;
  margin: 10px 0;
}

.bv-modal-content input[type="text"],
.bv-modal-content input[type="email"],
.bv-modal-content input[type="file"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
}

.bv-close {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 22px;
  color: var(--muted);
}
.bv-close:hover { color: var(--brand); }

#bv-msg {
  text-align: center;
  margin-top: 10px;
  font-weight: 500;
}

/* --- Анімація --- */
@keyframes fadeIn {
  from {opacity: 0; transform: scale(0.95);}
  to {opacity: 1; transform: scale(1);}
}

/* --- Адаптивність --- */
@media (max-width: 600px) {
  .bv-card { padding: 15px; }
  .bv-btn { width: 100%; }
}