.gas-pipeline-calculator {
  font-family: Arial, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
}

.gas-pipeline-calculator h3 {
  color: #34495e;
  margin: 25px 0 15px;
  text-align: center;
  font-size: 1.3em;
}

.input-section {
  margin-bottom: 25px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 25px;
}

@media (min-width: 576px) {
  .input-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.input-item label {
  display: block;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
  font-size: 15px;
  line-height: 1.4;
}

.input-field {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-field input {
  border: 2px solid #ddd;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 16px;
  width: 100%;
  max-width: 150px;
  transition: all 0.3s;
}

.input-field input::placeholder {
  color: #95a5a6;
  font-size: 14px;
  opacity: 0.7;
}

.input-field input:focus {
  border-color: #3498db;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.unit {
  font-size: 15px;
  color: #555;
  white-space: nowrap;
}

.calculate-button-container {
  text-align: center;
  margin-top: 10px;
}

.calculate-btn {
  background: linear-gradient(135deg, #ffbe34, #ff8e5e);
  color: white;
  border: none;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(255, 142, 94, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.calculate-btn:hover {
  background: linear-gradient(135deg, #ff8e5e, #ffbe34);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 142, 94, 0.4);
}

.calculate-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(255, 142, 94, 0.3);
}

.result-section {
  margin: 30px 0;
  animation: calcFadeIn 0.5s ease;
}

@keyframes calcFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.result-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px 25px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.result-title {
  color: #2c3e50;
  font-size: 1.2em;
  font-weight: 600;
}

.result-price-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.result-price {
  font-size: 2em;
  font-weight: 700;
  color: #ffc107;
}

.error-message {
  color: #e74c3c;
  font-size: 16px;
  font-weight: 600;
  margin-top: 5px;
}

.promo-notice {
  text-align: center;
  margin: 15px 0 30px;
  padding: 12px 20px;
  background-color: #fff8f8;
  border-radius: 6px;
  border-left: 4px solid #e74c3c;
  font-size: 15px;
  color: #2c3e50;
  animation: calcFadeIn 0.5s ease;
}

.promo-label {
  color: #e74c3c;
  font-weight: 700;
}

.tabs-section {
  margin: 30px 0;
  animation: calcFadeIn 0.5s ease;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 0;
}

.tab-btn {
  background: none;
  color: #7f8c8d;
  border: none;
  padding: 10px 20px 10px 15px;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 2px;
  border-radius: 6px 6px 0 0;
}

.tab-btn:hover {
  color: #3498db;
  background-color: #f5f5f5;
}

.tab-btn.active {
  color: #3498db;
  background-color: white;
  border: 1px solid #e0e0e0;
  border-bottom: 1px solid white;
  font-weight: 600;
}

.tab-text {
  white-space: nowrap;
}

.tab-close {
  display: none;
  color: #7f8c8d;
  font-size: 16px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.tab-btn:hover .tab-close {
  color: #e74c3c;
  background-color: #f8f8f8;
}

.tab-btn.active .tab-close {
  display: inline-block;
}

.tab-close:hover {
  color: white;
  background-color: #e74c3c !important;
}

.tab-content {
  display: none;
  padding: 20px;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 6px 6px;
  animation: calcFadeIn 0.3s ease;
  background-color: white;
}

.tab-content.active {
  display: block;
}

.work-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.work-items-table tr {
  border-bottom: 1px solid #f0f0f0;
}

.work-items-table tr:last-child {
  border-bottom: none;
}

.work-items-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.td-work-item {
  padding: 14px 0;
  color: #2c3e50;
  line-height: 1.4;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.services-table {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
  font-size: 14px;
}

.services-table td {
  padding: 14px 0;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: top;
}

.services-table tr:last-child td {
  border-bottom: none;
}

.services-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.td-service-compact {
  font-size: 14px;
  line-height: 1.4;
  color: #2c3e50;
}

.td-price-service {
  text-align: right;
  font-weight: bold;
  color: #27ae60;
  white-space: nowrap;
  font-size: 15px;
}

.service-description-compact {
  font-size: 13px;
  color: #666;
  margin-top: 8px;
  font-style: italic;
  line-height: 1.4;
}

@media (max-width: 575px) {
  .gas-pipeline-calculator {
    padding: 0 10px;
  }

  .input-section {
    padding: 15px;
  }

  .input-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .input-field input {
    width: 100%;
    max-width: none;
  }

  .calculate-btn {
    width: 100%;
    padding: 15px;
  }

  .result-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
  }

  .result-title {
    font-size: 1.1em;
  }

  .result-price {
    font-size: 1.8em;
    align-self: flex-end;
  }

  .error-message {
    font-size: 14px;
    align-self: flex-end;
  }

  .promo-notice {
    font-size: 14px;
    padding: 10px 15px;
  }

  .tabs-header {
    flex-direction: column;
    border-bottom: none;
    gap: 5px;
  }

  .tab-btn {
    width: 100%;
    text-align: left;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-right: 0;
    justify-content: space-between;
  }

  .tab-btn.active {
    border: 2px solid #3498db;
    border-bottom: 2px solid #3498db;
  }

  .tab-content {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-top: 5px;
  }

  .td-work-item,
  .td-service-compact,
  .td-price-service {
    padding: 12px 0;
    font-size: 13px;
  }

  .work-items-table,
  .services-table {
    font-size: 13px;
  }
}

@media (min-width: 768px) {
  .result-price {
    font-size: 2.5em;
  }
}

/* ===== Калькулятор газ (СНТ и поселки) ===== */
.shared-gas-calculator {
  font-family: Arial, sans-serif;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
}

.shared-gas-calculator h3 {
  color: #34495e;
  margin: 25px 0 15px;
  text-align: center;
  font-size: 1.3em;
}

.result-price-per-plot {
  color: #27ae60;
}

@media (max-width: 575px) {
  .shared-gas-calculator {
    padding: 0 10px;
  }
}

@media (min-width: 768px) {
  .shared-gas-calculator .result-price {
    font-size: 2.5em;
  }
}
