/* Responsive Payment/Mobile fields for main and print sections */
@media (max-width: 600px) {
  .payment-mobile-flex {
    flex-direction: column !important;
    gap: 0 !important;
  }
  .payment-mobile-flex > div {
    width: 100% !important;
    align-items: flex-start !important;
    text-align: left !important;
    padding-left: 0 !important;
  }
  .payment-mobile-flex input[type="text"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-top: 6px;
  }
}
/* Hide requirements and print page break on screen, show only in print/PDF */
#printRequirements, .print-page-break {
  display: none;
}
@media print {
  #printRequirements, .print-page-break {
    display: block !important;
  }
}
/* Modern Lawyer-Style UI for Property Tax Calculator */
body {
  background: #f5f5f7;
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  color: #222;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.container {
  max-width: 800px;
  margin: 40px auto 24px auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(44, 44, 44, 0.12);
  padding: 32px 32px 24px 32px;
  border: 1px solid #e0e0e0;
}

h1, h2, h3, h4 {
  color: #1a1a1a;
  font-family: 'Merriweather', serif;
  margin-bottom: 12px;
}

h1 {
  font-size: 2.2rem;
  letter-spacing: 1px;
  color: #2d2d2d;
  border-bottom: 2px solid #bfa46b;
  padding-bottom: 8px;
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

.form-group label {
  min-width: 180px;
  font-weight: 500;
  color: #3a2c0a;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.form-group select, .form-group input[type="number"] {
  flex: 1 1 220px;
  min-width: 0;
  max-width: 320px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #bfa46b;
  font-size: 1rem;
  margin-left: 10px;
  background: #f9f6f1;
  color: #2d2d2d;
  transition: border 0.2s;
  box-sizing: border-box;
  overflow-x: auto;
}

.form-group select {
  width: 100%;
  max-width: 320px;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
}

.form-group select:focus, .form-group input[type="number"]:focus {
  border: 1.5px solid #bfa46b;
  outline: none;
}

/* Prevent select dropdown from overflowing container on open */
.form-group {
  position: relative;
}

.form-group select {
  position: relative;
  z-index: 2;
}

/* For Webkit browsers, force dropdown to not overflow */
.form-group select:focus {
  outline: none;
}

.output-section {
  background: #f9f6f1;
  border-radius: 10px;
  padding: 24px 20px 18px 20px;
  margin-top: 18px;
  box-shadow: 0 2px 8px rgba(191, 164, 107, 0.07);
  border: 1px solid #e0d7b6;
}

.output-section h2 {
  color: #bfa46b;
  font-size: 1.3rem;
  margin-bottom: 18px;
}

#taxSummary {
  margin-top: 18px;
  background: #fffbe7;
  border-radius: 12px;
  border: 2px solid #bfa46b;
  box-shadow: 0 2px 8px rgba(191, 164, 107, 0.10);
  padding: 18px 18px 12px 18px;
}

#taxSummary h3 {
  color: #bfa46b;
  font-size: 1.18rem;
  margin: 0 0 14px 0;
  background: #f5e9c6;
  border-bottom: 2px solid #bfa46b;
  text-align: center;
  letter-spacing: 1px;
  padding: 10px 0 8px 0;
  border-radius: 10px 10px 0 0;
}

#taxSummary p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 7px 0 7px 0;
  font-size: 1.08rem;
  color: #2d2d2d;
  gap: 0;
  border-bottom: 1px solid #e0d7b6;
  padding-bottom: 4px;
}

#taxSummary p:last-child {
  border-bottom: none;
}

#taxSummary p strong {
  flex: 0 0 58%;
  text-align: left;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #3a2c0a;
  padding-right: 10px;
}

#taxSummary span, #taxSummary input[type="number"] {
  flex: 1 1 42%;
  text-align: right;
  min-width: 0;
  font-weight: 500;
  color: #6b4e13;
}

#taxSummary input[type="number"] {
  width: 100%;
  min-width: 80px;
  max-width: 100%;
  margin-left: 0;
  background: #f9f6f1;
  border: 1.5px solid #bfa46b;
  border-radius: 5px;
  font-size: 1.08rem;
  padding: 7px 12px;
  box-sizing: border-box;
}

#taxSummary p strong, #taxSummary span, #taxSummary input[type="number"] {
  align-items: center;
  display: flex;
}

#taxSummary table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 0.98rem;
}
#taxSummary th, #taxSummary td {
  border: 1px solid #e0d7b6;
  padding: 7px 6px;
  text-align: center;
}
#taxSummary th {
  background: #f5e9c6;
  color: #3a2c0a;
}
#taxSummary tr:nth-child(even) {
  background: #f9f6f1;
}

button {
  background: #bfa46b;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 22px;
  font-size: 1.08rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
  margin-right: 10px;
  margin-top: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
button:hover {
  background: #a88d4a;
}

footer {
  margin-top: 30px;
  text-align: right;
  color: #bfa46b;
  font-size: 0.98rem;
  font-family: 'Merriweather', serif;
}

/* PDF export mode: apply print styles to #printQuotation for jsPDF/html2canvas */
#printQuotation.pdf-export-mode,
#printRequirements.pdf-export-mode {
  width: 105mm !important;
  min-width: 105mm !important;
  max-width: 105mm !important;
  background: #fff !important;
  color: #222 !important;
  box-shadow: none !important;
  z-index: 9999 !important;
  padding: 0 !important;
  margin: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  right: 0;
  left: 0;
  position: relative !important;
  font-family: 'Merriweather', serif !important;
}
#printQuotation.pdf-export-mode::before {
  content: 'QAZI AIJAZ & CO';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-48deg);
  font-size: 2.8rem;
  color: #bfa46b;
  opacity: 0.8;
  font-family: 'Merriweather', serif;
  font-weight: bold;
  letter-spacing: 0.2em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 10000;

}
#printQuotation.pdf-export-mode table {
  width: 98% !important;
  margin: 0 auto !important;
  font-size: 0.85rem !important;
  border-collapse: collapse !important;
}
#printQuotation.pdf-export-mode td, #printQuotation.pdf-export-mode th {
  padding: 2px 2px !important;
  font-size: 0.85rem !important;
  border: 1px solid #bfa46b !important;
  color: #222 !important;
}
#printQuotation.pdf-export-mode th {
  background: #f5e9c6 !important;
  color: #3a2c0a !important;
}
#printQuotation.pdf-export-mode tr:nth-child(even) {
  background: #f9f6f1 !important;
}
#printQuotation.pdf-export-mode .rs-label {
  color: #bfa46b !important;
  font-weight: bold !important;
}

@media (max-width: 600px) {
  .container {
    padding: 10px 2vw;
  }
  .form-group label {
    min-width: 120px;
    font-size: 0.98rem;
  }
  .form-group select, .form-group input[type="number"] {
    max-width: 100%;
    width: 100%;
  }
  #taxSummary table, #taxSummary th, #taxSummary td {
    font-size: 0.93rem;
  }
}

@media screen {
  #printQuotation.pdf-no-color,
  #printQuotation.pdf-no-color * {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border-color: #222 !important;
    text-shadow: none !important;
    filter: none !important;
  }
  #printQuotation.pdf-no-color th,
  #printQuotation.pdf-no-color td {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #222 !important;
  }
  #printQuotation.pdf-no-color::before {
    display: block !important;
    color: #888 !important;
    opacity: 0.18 !important;
    content: 'QAZI AIJAZ & CO';
    position: absolute;
    top: 40%;
    left: 50%;
    width: 120%;
    min-width: 600px;
    text-align: center;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 3.0rem;
    font-family: 'Merriweather', serif;
    font-weight: bold;
    letter-spacing: 0.1em;
    pointer-events: none;
    user-select: none;
    white-space: nowrap;
    z-index: 10000;
    background: none !important;
    box-shadow: none !important;
    mix-blend-mode: multiply;
    overflow: hidden;
  }
}

/* Hide elements with the .hidden class */
.hidden {
  display: none !important;
}
