/* Notarization Header in Small & Responsive Views */
.notary-calculator-container .notarization-header {
  margin-bottom: 16px;
}

.notary-calculator-container .notarization-title-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.notary-calculator-container .notarization-header h2,
.notary-calculator-container .notarization-title {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

.notary-calculator-container .notarization-header .state-info-link-wrapper {
  margin: 0;
  max-width: 100%;
}

.notary-calculator-container .state-info-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 4px 11px !important;
  border-radius: 9999px !important;
  background: #eff6ff !important;
  border: 1px solid #bfdbfe !important;
  color: #1d4ed8 !important;
  font-size: 0.775rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  line-height: 1.35 !important;
  transition: all 0.15s ease-in-out !important;
  cursor: pointer !important;
  max-width: 100%;
  white-space: normal;
}

.notary-calculator-container .state-info-pill:hover,
.notary-calculator-container .state-info-pill:focus {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
  color: #1e40af !important;
  text-decoration: none !important;
  outline: none !important;
}

/* Notarization Counts Container */
.notary-calculator-container .notarization-counts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.notary-calculator-container .notarization-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.notary-calculator-container .notarization-count-field {
  min-width: 0;
}

.notary-calculator-container .notarization-count-field label {
  display: block !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #475569 !important;
  margin-bottom: 5px !important;
}

/* Stepper Input Group */
.notary-calculator-container .stepper-input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease;
}

.notary-calculator-container .stepper-input-wrapper:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.notary-calculator-container .stepper-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-height: 42px;
  padding: 0;
  border: none;
  background: #f8fafc;
  color: #334155;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.notary-calculator-container .stepper-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.notary-calculator-container .stepper-btn:active {
  background: #cbd5e1;
}

.notary-calculator-container .notarization-count-field input {
  box-sizing: border-box;
  width: 100% !important;
  min-width: 0;
  min-height: 42px;
  padding: 4px 6px !important;
  border: none !important;
  border-radius: 0 !important;
  text-align: center;
  font-size: 1.05rem !important;
  font-weight: 700;
  color: #0f172a !important;
  background: transparent !important;
  font-variant-numeric: tabular-nums;
  outline: none !important;
  box-shadow: none !important;
}

/* Hide native number spinners to keep custom stepper UI neat */
.notary-calculator-container .notarization-count-field input::-webkit-outer-spin-button,
.notary-calculator-container .notarization-count-field input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.notary-calculator-container .notarization-count-field input[type="number"] {
  -moz-appearance: textfield;
}

/* Result Card */
.notary-calculator-container .notarization-count-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  width: 100%;
  margin-left: 0;
  text-align: left;
}

.notary-calculator-container .signatures-meta {
  display: flex;
  flex-direction: column;
}

.notary-calculator-container #signaturesLabel {
  display: block;
  margin: 0;
  color: #1e293b;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

.notary-calculator-container .signatures-calc-hint {
  font-size: 0.725rem;
  color: #64748b;
  margin-top: 2px;
}

.notary-calculator-container #signatures {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: auto;
  color: #1d4ed8;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Approximate Duration Result Card */
.notary-calculator-container .notarization-duration-result {
  border-top: 1px solid #e2e8f0;
}

.notary-calculator-container .duration-meta {
  display: flex;
  flex-direction: column;
}

.notary-calculator-container .duration-label-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.notary-calculator-container .duration-icon {
  color: #3b82f6;
  flex-shrink: 0;
}

.notary-calculator-container #durationLabel {
  display: block;
  margin: 0;
  color: #1e293b;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

.notary-calculator-container .duration-calc-hint {
  font-size: 0.725rem;
  color: #64748b;
  margin-top: 2px;
}

.notary-calculator-container .duration-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.notary-calculator-container .addon-help {
  margin: -5px 0 14px;
  color: #64748b;
  font-size: 0.85em;
}

.addon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.notary-calculator-container .addon-option {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  box-sizing: border-box;
  margin: 0 !important;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  line-height: 1.45;
  cursor: pointer;
}

.notary-calculator-container .addon-option:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.notary-calculator-container .addon-option.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.notary-calculator-container .addon-checkbox {
  width: 18px !important;
  height: 18px !important;
  padding: 0 !important;
  margin: 0;
  accent-color: #2563eb;
  cursor: pointer;
}

.notary-calculator-container .addon-option:focus-within,
.notary-calculator-container .addon-toggle:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: 3px;
}

.addon-name {
  overflow-wrap: anywhere;
}

.addon-price {
  color: #0f172a;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.notary-calculator-container .addon-toggle {
  display: block;
  margin: 12px auto 0;
  padding: 10px 16px;
  min-height: 44px;
  background: transparent;
  color: #1d4ed8;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
  font-size: 0.85em;
  cursor: pointer;
}

.notary-calculator-container .addon-toggle:hover {
  background: #eff6ff;
}

.addon-summary {
  margin: 14px 0 0;
  color: #475569;
  font-size: 0.85em;
  text-align: right;
}

.notary-calculator-container .addon-section [hidden] {
  display: none !important;
}

@media (max-width: 600px) {
  .addon-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.notary-calculator-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.025) !important;
  border: 1px solid #e2e8f0 !important;
}

@media (max-width: 600px) {
  .notary-calculator-container {
    padding: 20px 16px !important;
  }
}

/* Compact padding in widget drawer & embedded card frames */
.widget-sub-wrapper .notary-calculator-container,
.new-design-container .notary-calculator-container,
.card-body .notary-calculator-container {
  padding: 20px 16px !important;
}

.calculator-section {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin-bottom: 30px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding-bottom: 25px !important;
}

.calculator-section:last-of-type {
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-bottom: 25px !important;
}

.notary-calculator-container h1 {
  font-weight: 700 !important;
  color: #0f172a !important;
  font-size: 1.8em !important;
  margin-bottom: 25px !important;
  letter-spacing: -0.5px;
  text-align: center;
}

.notary-calculator-container h2 {
  color: #0f172a !important;
  font-weight: 600 !important;
  font-size: 1.15em !important;
  margin-top: 0 !important;
  margin-bottom: 15px !important;
}

.notary-calculator-container label {
  display: block !important;
  font-weight: 500 !important;
  color: #475569 !important;
  margin-bottom: 6px !important;
  font-size: 0.85em !important;
}

.notary-calculator-container input, 
.notary-calculator-container select {
  width: 100% !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  padding: 8px 12px !important;
  font-size: 0.9em !important;
  color: #1e293b !important;
  outline: none !important;
  background-color: #ffffff !important;
  transition: border-color 0.15s ease !important;
}

.notary-calculator-container input:focus, 
.notary-calculator-container select:focus {
  border-color: #64748b !important;
}

.notary-calculator-container input[readonly] {
  background-color: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
  font-weight: 600 !important;
  cursor: not-allowed !important;
}

.total-summary-card {
  background: #fafafa !important;
  color: #18181b !important;
  border: 1px solid #e4e4e7 !important;
  padding: 25px !important;
  border-radius: 8px !important;
  text-align: center !important;
  box-shadow: none !important;
}

/* Keep address validation beside the input in the legacy widget too. */
.notary-calculator-container .input-group > .form-control {
  width: 1% !important;
  min-width: 0;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.total-summary-card h2 {
  font-size: 1em !important;
  font-weight: 600 !important;
  color: #71717a !important;
  margin-bottom: 6px !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.total-summary-card #total {
  font-size: 2.8em !important;
  font-weight: 800 !important;
  color: #18181b !important;
}

.total-summary-card #breakdown {
  margin-top: 15px !important;
  text-align: left !important;
  font-size: 0.9em !important;
  line-height: 1.6 !important;
  border-top: 1px solid #e4e4e7 !important;
  padding-top: 12px !important;
  color: #3f3f46 !important;
}

.total-summary-card #breakdown div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.state-info-link-wrapper {
  margin-top: 5px;
  margin-bottom: 5px;
}

.state-info-link {
  color: #2563eb !important;
  font-size: 0.95em !important;
  font-weight: 500 !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: color 0.15s ease-in-out !important;
}

.state-info-link:hover {
  color: #1d4ed8 !important;
  text-decoration: underline !important;
}

.state-info-modal-content {
  border-radius: 12px !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  overflow: hidden !important;
}

.state-info-modal-header {
  background-color: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 16px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.state-info-modal-header .modal-title {
  font-size: 1.1em !important;
  color: #0f172a !important;
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
}

.state-info-modal-header .close {
  color: #64748b !important;
  opacity: 0.75 !important;
  font-size: 1.5rem !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

.state-info-modal-header .close:hover {
  opacity: 1 !important;
  color: #0f172a !important;
}

.state-info-modal-body {
  padding: 20px !important;
  max-height: 70vh !important;
  overflow-y: auto !important;
}

.state-info-modal-footer {
  background-color: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  padding: 12px 20px !important;
}

#stateInfoBox {
  margin-top: 0 !important;
  padding: 16px 18px !important;
  background-color: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-left: 4px solid #2563eb !important;
  border-radius: 6px !important;
  font-size: 0.9em !important;
  line-height: 1.6 !important;
  color: #334155 !important;
}

#stateInfoBox h4 {
  margin: 0 0 8px 0 !important;
  color: #18181b !important;
  font-weight: 700 !important;
  font-size: 1em !important;
}

#stateInfoModal #stateInfoBox #infoBoxTitle,
#stateInfoModal #stateInfoBox > h4:first-child {
  display: none !important;
}

#stateInfoModal.modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1050 !important;
  display: none;
  width: 100% !important;
  height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  outline: 0 !important;
}

#stateInfoModal.modal.show {
  display: block !important;
}

#stateInfoModal .modal-dialog {
  width: calc(100% - 48px);
  max-width: 800px;
  min-height: 0;
  margin: 24px auto;
  align-items: flex-start;
}

#stateInfoModal .modal-dialog::before {
  display: none;
}

#stateInfoModal .modal-content {
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
}

#stateInfoModal .modal-header,
#stateInfoModal .modal-footer {
  flex-shrink: 0;
}

#stateInfoModal .modal-body {
  min-height: 0;
}

#stateInfoModalBackdrop.modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 1040 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-color: rgba(15, 23, 42, 0.6) !important;
}

/* Keep the distance control and its calculated fee visually connected. */
.notary-calculator-container .travel-fee-panel,
.notary-calculator-container .notarization-counts {
  padding: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.notary-calculator-container .travel-fee-calculation {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.notary-calculator-container .travel-fee-distance {
  flex: 1 1 140px;
  max-width: 200px;
  min-width: 0;
}

.notary-calculator-container .travel-fee-mile-input {
  position: relative;
}

.notary-calculator-container .travel-fee-mile-input input {
  box-sizing: border-box;
  padding-right: 64px !important;
  min-height: 44px;
}

.notary-calculator-container .travel-fee-mile-input span {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 0.85em;
  pointer-events: none;
}

.notary-calculator-container .travel-fee-mile-input input:focus-visible {
  outline: 2px solid #2563eb !important;
  outline-offset: 2px;
}

.notary-calculator-container .travel-fee-amount {
  margin-left: auto;
  padding-bottom: 5px;
  color: #0f172a;
  font-size: 1.75em;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.notary-calculator-container .travel-fee-help {
  color: #475569;
  font-size: 0.8em;
  line-height: 1.5;
  margin: 14px 0 0;
}

.notary-calculator-container .travel-fee-description {
  color: #64748b;
  font-size: 0.8em;
  line-height: 1.5;
  margin: 10px 0 0;
}

#search_form .is-invalid {
  border-color: #dc3545 !important;
}

#search_form .booking-field-error,
#search_form .invalid-feedback,
#search_form .errorlist {
  display: block;
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  background-color: #fff1f2;
  color: #9f1239 !important;
  font-size: 0.875rem;
  line-height: 1.5;
  list-style: none;
}
