/* concrete-cost-calculator.css - Enhanced UI */
 
#concrete-cost-tool {
  max-width: 800px;
  margin: 40px auto;
  padding: 32px;
  background: linear-gradient(to bottom right, #f7fafd, #f0f6ff);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  font-family: 'Segoe UI', sans-serif;
  color: #1f1f1f;
  transition: all 0.3s ease-in-out;
}
 
#concrete-cost-tool h1 {
  text-align: center;
  font-size: 34px;
  margin-bottom: 14px;
  color: #0c4377;
}
 
#concrete-cost-tool .description {
  text-align: center;
  font-size: 17px;
  color: #555;
  margin-bottom: 30px;
}
 
fieldset {
  margin: 30px 0;
  padding: 26px 30px;
  border: 1px solid #c1dbf0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
 
legend {
  font-weight: bold;
  padding: 0 12px;
  color: #0c4377;
  font-size: 18px;
}
 
.form-row {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  transition: all 0.3s ease;
}
 
.form-row label {
  flex: 1 1 220px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
 
.form-row label::before {
  content: '\1F4CF'; /* 🔏 */
  font-size: 16px;
  color: #007acc;
  margin-right: 4px;
}
 
.form-row input,
.form-row select {
  flex: 2 1 240px;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  transition: border 0.3s, box-shadow 0.3s;
  background: #fdfefe;
}
 
.form-row input:focus,
.form-row select:focus {
  border-color: #007acc;
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.2);
}
 
.unit-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 2 1 240px;
}
 
.unit-group input {
  flex: 1 1 auto;
  padding-right: 10px;
}
 
.unit-group select.unit-select {
  width: 80px;
  padding: 9px 6px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  background-color: #fff;
  cursor: pointer;
  transition: border 0.3s, box-shadow 0.3s;
}
 
.unit-group select.unit-select:focus {
  border-color: #007acc;
  box-shadow: 0 0 0 2px rgba(0, 122, 204, 0.2);
  outline: none;
}
 
button[type="submit"] {
  background: linear-gradient(to right, #007acc, #005f9e);
  color: #fff;
  padding: 13px 28px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s;
  display: block;
  margin: 25px auto 0;
  box-shadow: 0 4px 12px rgba(0, 122, 204, 0.2);
  position: relative;
}
 
button[type="submit"]:hover {
  background: #005f9e;
  transform: translateY(-1px);
}
 
button[type="submit"].loading::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
 
@keyframes spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}
 
.results {
  margin-top: 30px;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}
 
.results[style*="display: block"] {
  opacity: 1;
}
 
.result-box {
  background: #eaf4fd;
  padding: 16px 20px;
  margin-bottom: 14px;
  border-left: 5px solid #007acc;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}
 
.result-box:hover {
  background: #d8ecfb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
 
.result-box.summary {
  background: #dceffd;
  border-left-color: #005f9e;
  font-weight: 500;
}
 
.shape-input {
  display: none;
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}
 
.shape-input.visible {
  display: flex;
  opacity: 1;
  height: auto;
}
 
#diagram-image {
  max-width: 100%;
  height: auto;
  margin: 30px auto 20px;
  display: block;
  border: 1px solid #ddd;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
 
@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
    align-items: flex-start;
  }
 
  .form-row label,
  .form-row input,
  .form-row select {
    flex: 1 1 100%;
  }
 
  .unit-group {
    flex-direction: row;
    flex-wrap: wrap;
  }
 
  .unit-group select.unit-select {
    width: 100%;
    margin-top: 6px;
  }
 
  button[type="submit"] {
    width: 100%;
  }
}