/* fp2-pdam.css - the PDAM tile in the home order form's nominal list (fp2-pdam.js). */

#order_form #nominal .fp2-pdam {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

#order_form #nominal .fp2-pdam-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--fp2-border, #dfe8ee);
  border-radius: 10px;
  background: #fff;
  min-width: 0;
}

#order_form #nominal .fp2-pdam-panel[hidden] {
  display: none;
}

#order_form #nominal .fp2-pdam-panel .fp2-field {
  margin: 0;
}

#order_form #nominal .fp2-pdam-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#order_form #nominal .fp2-pdam-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 1.5px solid var(--fp2-border, #dfe8ee);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  color: var(--fp2-text, #0b2a3f);
  font: inherit;
}

#order_form #nominal .fp2-pdam-item:hover,
#order_form #nominal .fp2-pdam-item:focus-visible {
  border-color: var(--fp2-primary, #0c74b0);
}

#order_form #nominal .fp2-pdam-item.is-selected {
  border: 2px solid var(--fp2-primary, #0c74b0);
  background: var(--fp2-primary-soft, #e6f3fa);
}

#order_form #nominal .fp2-pdam-item.is-unavailable {
  opacity: .55;
  cursor: not-allowed;
}

#order_form #nominal .fp2-pdam-item-name {
  font-weight: 700;
  font-size: 14px;
  overflow-wrap: anywhere;
}

#order_form #nominal .fp2-pdam-item small {
  color: var(--fp2-muted, #5b7083);
  font-size: 12.5px;
}

/* a PDAM bill asks no Nomor HP */
#order_form .fp2-number[hidden] {
  display: none;
}

/* the search box: icon inside the field, like the nominal search */
#order_form #nominal .fp2-pdam-panel .fp2-search {
  position: relative;
  display: block;
}

#order_form #nominal .fp2-pdam-panel .fp2-search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--fp2-muted, #5b7083);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

#order_form #nominal .fp2-pdam-panel .fp2-search .fp2-input {
  width: 100%;
  padding-left: 40px;
}

/* .fp2-search is a flex item elsewhere (flex-basis 100% on phones): in this column it must keep the height of its input */
#order_form #nominal .fp2-pdam-panel .fp2-field > .fp2-search {
  flex: 0 0 auto;
  width: 100%;
}

#order_form #nominal .fp2-pdam-panel .fp2-search svg {
  z-index: 1;
}

/* a global rule gives every input in the order form a 20px bottom margin: it made the wrapper 64px tall and put the icon (top: 50%) below the field */
#order_form #nominal .fp2-pdam-panel .fp2-search .fp2-input {
  margin: 0;
}

/* The input paints over the inline svg icon (it sits above it in this form), so the icon is the input's own background instead */
#order_form #nominal .fp2-pdam-panel .fp2-search svg {
  display: none;
}

#order_form #nominal .fp2-pdam-panel .fp2-search .fp2-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%235b7083' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
  background-size: 17px 17px;
}
