@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Quote Form Styles */
#quote-form {
  font-family: 'Poppins', sans-serif;
  max-width: 600px;
  margin: 2rem auto;
  color: #000000;
}
#quote-form p {
  margin-bottom: 1rem;
}
#quote-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #000000;
}
#quote-form input[type="text"],
#quote-form input[type="email"],
#quote-form input[type="number"],
#quote-form textarea,
#quote-form select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#quote-form input:focus,
#quote-form textarea:focus,
#quote-form select:focus {
  outline: none;
  border-color: #EB4942;
  box-shadow: 0 0 0 3px rgba(235, 73, 66, 0.2);
}

/* Features Required layout */
#quote-form .features {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
#quote-form .features-label {
  font-weight: 500;
  margin-right: 1rem;
}
#quote-form .feature-item {
  display: flex;
  align-items: center;
  font-weight: 400;
}
#quote-form .feature-item input {
  margin: 0 0.5rem 0 0;
}

/* Submit Button */
#quote-form input[type="submit"] {
  background-color: #EB4942;
  color: #ffffff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}
#quote-form input[type="submit"]:hover {
  background-color: #000000;
}

/* Two-column responsive layout */
#quote-form {
  max-width: 900px;
  width: 95%;
  margin: 2rem auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-gap: 1.5rem;
}

/* Make these sections span both columns */
#quote-form fieldset.feature-group,
#quote-form .features,
#quote-form #qf_pages_section,
#quote-form #qf_cost_summary {
  grid-column: 1 / -1;
}

/* Ensure the submit button spans both columns */
#quote-form input[type="submit"] {
  grid-column: 1 / -1;
  justify-self: start;
}

# Live Total Quote styling */
# Live Total Quote styling */
/* Live Total Quote styling */
#qf_cost_summary {
  grid-column: 1 / -1;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: right;
  margin-bottom: 1rem;
}

/* Pricing section boxed layout */
#qf_pricing_section {
  grid-column: 1 / -1;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  padding: 1rem;
  border-radius: 4px;
  display: block;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

/* Arrange label and input in a row */
#qf_pricing_section p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
}
#qf_pricing_section p label {
  flex: 1;
  margin-right: 0.5rem;
}
#qf_pricing_section p input[type="number"],
#qf_pricing_section p input[type="checkbox"] {
  flex: 0 0 auto;
}

/* Generate Quote button beneath pricing */
#quote-form input[type="submit"] {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0.5rem;
}

/* Quote Items Table Styling */
/* Quote Items Table Container */
#qf_line_items_section {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  margin-top: 2rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  background: #fff;
  padding-top: 1rem;
  padding-bottom: 1rem;
  overflow-x: auto;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  grid-column: 1 / -1;
}
/* Table Styling */
#qf_line_items_section table {
  min-width: 700px;
  width: 100%;
  max-width: none;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  table-layout: auto;
  background: #fff;
}

/* Table Header */
#qf_line_items_section th {
  background-color: #EB4942;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'Poppins', sans-serif;
  font-size: 1.07em;
  padding: 1.1em 1em;
  vertical-align: middle;
}

/* Table Cells */
#qf_line_items_section td {
  border: 1px solid #ccc;
  padding: 1.1em 1em;
  vertical-align: middle;
  font-size: 1.01em;
  word-break: break-word;
  white-space: normal !important;
}

/* Remove button column (1st) */
/* Columns Widths */
#qf_line_items_section th:nth-child(1),
#qf_line_items_section td:nth-child(1) {
  width: 36px;
  text-align: center;
}
#qf_line_items_section th:nth-child(2),
#qf_line_items_section td:nth-child(2) {
  width: 48px;
  text-align: center;
}
#qf_line_items_section th:nth-child(3),
#qf_line_items_section td:nth-child(3) {
  min-width: 320px;
  max-width: 100%;
  text-align: left;
}
#qf_line_items_section th:nth-child(4),
#qf_line_items_section td:nth-child(4) {
  min-width: 130px;
  max-width: 160px;
  text-align: left;
  padding-left: 1em;
  padding-right: 1em;
}
#qf_line_items_section th:nth-child(5),
#qf_line_items_section td:nth-child(5) {
  min-width: 130px;
  width: 160px;
  text-align: right;
}

/* Constrain pricing and feature manual input widths */
#qf_pricing_section input[type="number"],
.qf_feature_price_input {
  max-width: 6ch;
}
#qf_line_items_section .qf_feature_price_type {
  max-width: 8ch;
  margin-right: 0.5rem;
  min-width: 7ch;
}
.qf_feature_price_input {
  margin-left: 0.3rem;
  min-width: 5ch;
  text-align: right;
}

/* Additional styling for included features */
.qf-included-cell {
  color: #888;
  font-style: italic;
}

/* Pricing Table Styling */
#qf_pricing_table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}
#qf_pricing_table th,
#qf_pricing_table td {
  border: 1px solid #ccc;
  padding: 0.5rem;
}
#qf_pricing_table th {
  background-color: #EB4942;
  color: #fff;
  text-align: left;
}
#qf_pricing_table td:nth-child(2) {
  text-align: right;
}
#qf_pricing_table tr:nth-child(even) td {
  background-color: #f9f9f9;
}

/* New styles for updated Quote Items table structure */

/* Remove Button Styling */
.qf_remove_btn {
  background-color: transparent;
  border: none;
  color: #000;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}
.qf_remove_btn:hover,
.qf_remove_btn:focus {
  background-color: #EB4942;
  color: #fff;
  outline: none;
}

/* Inputs and Selects */
.input-price,
.select-type,
.select-included-manual,
.input-desc {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 1.05rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.input-price {
  max-width: 90px;
  min-width: 65px;
  text-align: right;
}

#qf_line_items_section .select-type {
  min-width: 130px; /* increase minimum width */
  max-width: 170px; /* slightly larger max width */
  cursor: pointer;
  padding: 0.4rem 0.8rem; /* increased horizontal padding */
  font-size: 1.05rem;
  box-sizing: border-box;
}

.select-type {
  min-width: 128px;
  max-width: 150px;
  cursor: pointer;
}

.select-included-manual {
  min-width: 120px;
  cursor: pointer;
}

#qf_line_items_section .input-desc {
  min-height: 3em; /* taller textarea for multiline */
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  padding-left: 0.4rem;
  line-height: 1.35;
  font-size: 1rem;
  font-family: inherit;
  border-radius: 4px;
  border: 1px solid #ccc;
  width: 100%;
  box-sizing: border-box;
}

/* Description Input */
.input-desc {
  min-height: 2.2em;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  padding-left: 0.4rem;
  line-height: 1.35;
}

/* Totals container visually distinct and spaced below table */
#qf_totals {
  font-weight: 700;
  font-size: 1.3rem;
  margin-top: 1.5rem;
  text-align: left;
  padding-left: 0.25rem;
}

@media (max-width: 600px) {
  #qf_line_items_section {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* Included text styling */
.included-text {
  color: #888;
  font-style: italic;
  cursor: pointer;
  font-size: 1.07em;
  transition: color 0.2s;
}
.included-text:hover {
  color: #EB4942;
  text-decoration: underline;
}

/* Table row striping and hover */
#qf_line_items_section tr:nth-child(even) td {
  background-color: #f4f4f4;
}
#qf_line_items_section tr:hover td {
  background-color: #ffeaea;
}

/* Focus styles */
#qf_line_items_section input:focus,
#qf_line_items_section select:focus {
  border-color: #EB4942;
  box-shadow: 0 0 0 2px rgba(235, 73, 66, 0.19);
  background: #fff5f5;
  outline: none;
}

/* Responsive table scroll on small screens */
@media (max-width: 600px) {
  #qf_line_items_section {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    overflow-x: auto;
  }
  #qf_line_items_section table {
    min-width: 540px;
    display: block;
    overflow-x: auto;
  }
}

/* Higher contrast for Included text/cell */
.qf-included-cell,
.included-text,
.qf_included_manual[value="included"] {
  color: #555;
  font-style: italic;
}

/* Muted remove cell (if used) */
.qf-remove-inactive {
  color: #bbb !important;
  font-size: 1.3em !important;
  font-weight: 700 !important;
  text-align: center !important;
  opacity: 0.5;
}

/* Focused input/select in table: stronger border, light bg */
#qf_line_items_section input:focus,
#qf_line_items_section select:focus {
  border-color: #EB4942;
  box-shadow: 0 0 0 2px rgba(235,73,66,0.19);
  background: #fff5f5;
  outline: none;
}
