.calc-card {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  margin-bottom: 24px;
  overflow: hidden;
  background: transparent;
}

.calc-card-header {
  background: #0b4f8a;
  color: #ffffff;
  font-weight: 600;
  padding: 10px 16px;
}

.calc-card-body {
  padding: 16px;
}

.calc-inline-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 24px !important;
}

.calc-form-col {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 0 !important;
}

.shape-diagram-col {
  flex: 0 0 auto !important;
  width: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 6px 10px !important;
}

.shape-img {
  display: block;
  height: auto;
}

.shape-img--slab {
  width: 170px;
}

.shape-img--hole {
  width: 170px;
}

.shape-img--tube {
  width: 155px;
}

.shape-img--curb {
  width: 250px;
}

.shape-img--stairs {
  width: 250px;
}

.form-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.form-row label {
  min-width: 145px;
  font-weight: 500;
}

.form-row input[type="text"] {
  width: 105px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.form-row select {
  width: auto;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.btn-primary {
  background: #0b4f8a;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-secondary {
  background: #e2e8f0;
  color: #1e293b;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-pdf {
  background: #15803d;
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.btn-pdf:hover {
  background: #166534;
}

/* Highlighted Result Box */
.result-area {
  margin-top: 16px;
}

.result-box {
  background: #ecfdf5;
  border: 1px solid #86efac;
  border-left: 5px solid #15803d;
  color: #052e16;
  padding: 14px 16px;
  border-radius: 6px;
}

.result-box h3 {
  margin: 0 0 10px 0;
  font-size: 17px;
  color: #15803d;
  font-weight: 700;
}

.highlight-val {
  background: #fef08a;
  color: #1e293b;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #facc15;
  font-weight: 700;
}

.cinfoT,
.result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  background: #ffffff;
}

.cinfoT td,
.result-table td {
  border: 1px solid #bbf7d0;
  padding: 7px 10px;
  color: #052e16;
}

.cinfoT tr td:first-child,
.result-table tr td:first-child {
  font-weight: 600;
  background: #f0fdf4;
  width: 38%;
}

.result-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.error-msg {
  color: #dc2626;
  font-weight: 600;
  background: #fef2f2;
  border-left: 4px solid #dc2626;
  padding: 10px 12px;
  border-radius: 4px;
}

.info-section {
  margin-top: 28px;
}

/* PDF Name Modal */
.pdf-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.pdf-modal-backdrop.open {
  display: flex;
}

.pdf-modal {
  background: #ffffff;
  color: #0f172a;
  width: 100%;
  max-width: 440px;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.pdf-modal-header {
  background: #15803d;
  color: #ffffff;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 16px;
}

.pdf-modal-body {
  padding: 16px;
}

.pdf-modal-sub {
  font-size: 13px;
  color: #334155;
  margin: 0 0 12px 0;
}

.pdf-modal-body label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.pdf-modal-body input[type="text"],
.pdf-modal-body textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 12px;
}

.pdf-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 16px 16px;
}

@media (max-width: 768px) {
  .calc-inline-row {
    flex-wrap: wrap !important;
  }
}
