/* === Form Container === */
#duct-form-wrapper,
#duct-form {
  width: 100%;
  max-width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* === Duct Row List === */
#duct-rows {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

/* === Row Layout (inline, no wrap) === */
.duct-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-bottom: 0.75rem;
  flex-wrap: nowrap;
  overflow-x: 0;
}

/* Prevent shrinking on narrow screens */
.duct-entry > * {
  flex-shrink: 0;
}

/* === Inputs & Selects === */
.form-control,
.form-select {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 2px;
  border: 1px solid #000000;
  background-color: #fff;
  color: #000;
  width: 100%;
  min-width: 80px;
  box-sizing: border-box;
  flex: 0 0 auto;
}

/* === Wider fields for first two columns === */
.duct-entry > *:nth-child(1),
.duct-entry > *:nth-child(2) {
  min-width: 150px;
}

/* === Focus Styling === */
input:focus,
select:focus,
textarea:focus {
  border-color: #3399ff;
  box-shadow: 0 0 0 2px rgba(51, 153, 255, 0.2);
  outline: none;
}

/* === Inline Icon Container === */
.row-icons {
  display: flex;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* === Icon Buttons (Font Awesome) === */
.icon-btn {
  background: none;
  border: none;
  font-size: 1.125rem;
  padding: 0;
  cursor: pointer;
  height: 28px;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.icon-btn i {
  pointer-events: none;
}

.icon-btn.blue {
  color: #007BFF;
}
.icon-btn.blue:hover {
  color: #0056b3;
}

.icon-btn.green {
  color: #28a745;
}
.icon-btn.green:hover {
  color: #1e7e34;
}

/* === Comment Box Below Each Row === */
.comment-wrapper {
  width: 100%;
  margin-top: 4px;
}

.comment-box {
  width: 100%;
  min-height: 60px;
  font-size: 0.875rem;
  margin-top: 4px;
  padding: 0.5rem;
  box-sizing: border-box;
  border: 2px solid #0066cc;
  border-radius: 4px;
  background-color: #fff;
}

/* === Print Styling === */
@media print {
  .comment-wrapper {
    display: block !important;
  }

  .comment-box {
    display: block !important;
  }

  .icon-btn {
    display: none !important;
  }
}
