/* fp2-paket.css - package families in the home order form's nominal list (fp2-paket.js): a nominal-style row with a small
   "Cek harga" button where the price goes, and the offers expanded below it. */

#order_form #nominal .fp2-paket {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  scroll-margin-top: 140px;   /* scrolled to after "harga berubah": clear of the sticky panel header and group title */
}

/* the family row looks like any nominal row (same card, height, fonts); only the price spot holds a button */
#order_form #nominal .fp2-paket-row {
  cursor: pointer;
}

#order_form #nominal .fp2-paket.is-open > .fp2-paket-row {
  border-color: var(--fp2-primary, #0c74b0);
}

#order_form #nominal .fp2-paket-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1.5px solid var(--fp2-primary, #0c74b0);
  border-radius: 8px;
  background: #fff;
  color: var(--fp2-primary-dark, #095a88);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

#order_form #nominal .fp2-paket-btn:hover {
  background: var(--fp2-primary-soft, #e6f3fa);
}

#order_form #nominal .fp2-paket-btn:focus-visible,
#order_form #nominal .fp2-paket-again:focus-visible {
  outline: 2px solid var(--fp2-primary, #0c74b0);
  outline-offset: 2px;
}

#order_form #nominal .fp2-paket-btn[aria-disabled="true"] {
  cursor: progress;
  background: var(--fp2-primary-soft, #e6f3fa);
}

#order_form #nominal .fp2-paket-spin {
  width: 13px;
  height: 13px;
  border: 2px solid var(--fp2-border-strong, #c9d8e2);
  border-top-color: var(--fp2-primary, #0c74b0);
  border-radius: 50%;
  animation: fp2-paket-spin .8s linear infinite;
}

@keyframes fp2-paket-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  #order_form #nominal .fp2-paket-spin { animation-duration: 2.4s; }
}

/* the expanded offers: grouped under the family row by a left border, slightly indented */
#order_form #nominal .fp2-paket-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  margin-left: 8px;
  padding-left: 10px;
  border-left: 3px solid var(--fp2-primary-soft, #e6f3fa);
}

#order_form #nominal .fp2-paket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--fp2-muted, #5b7083);
}

#order_form #nominal .fp2-paket-again {
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--fp2-primary, #0c74b0);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

#order_form #nominal .fp2-paket-again:hover {
  text-decoration: underline;
}

/* compact notes inside the area: "harga berubah" (amber) and errors (red) */
#order_form #nominal .fp2-paket-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--fp2-muted, #5b7083);
}

#order_form #nominal .fp2-paket-note.is-error {
  background: var(--fp2-danger-soft, #fbe7e2);
  color: var(--fp2-danger, #a3321f);
}

#order_form #nominal .fp2-paket-note.is-changed {
  background: var(--fp2-amber-soft, #fff3d1);
  color: var(--fp2-amber-text, #6b4a00);
  font-weight: 600;
}

#order_form #nominal .fp2-paket-note .fp2-paket-again {
  padding: 0 2px;
  color: inherit;
  text-decoration: underline;
}

#order_form #nominal .fp2-paket-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#order_form #nominal .fp2-paket-list .fp2-nominal[hidden],
#order_form #nominal .fp2-paket-nomatch[hidden] {
  display: none;
}

/* the list's own search box: icon inside the field (the nominal list styles its own svgs) */
#order_form #nominal .fp2-paket-search {
  position: relative;
  flex: none;
  width: 100%;
}

#order_form #nominal .fp2-paket-search > svg {
  position: absolute;
  left: 14px;
  top: 22px;   /* the middle of the 44px field (the wrapper can be taller) */
  transform: translateY(-50%);
  display: block;
  fill: none;
  stroke: var(--fp2-muted, #5b7083);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
  z-index: 3;   /* above the field, which has its own white background */
}

#order_form #nominal .fp2-paket-search .fp2-input {
  position: static;
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
}

/* A guest picked a package: no payment method (Saldo Akun only), a login prompt in place of the pay button. */
#order_form .fp2-paket-login {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  flex: 1 1 100%;
}

#order_form .fp2-paket-login[hidden] {
  display: none;
}

#order_form .fp2-paket-login p {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--fp2-amber-soft, #fff3d1);
  color: var(--fp2-amber-text, #6b4a00);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
}

#order_form .fp2-paket-login a {
  text-align: center;
  text-decoration: none;
}
