/**
 * Bookvatio Pro — Frontend styles
 * Scoped under .booknest (internal class kept for upgrade safety) via inheritance from the host container.
 */

.booknest .bnp-coupon {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: var(--surface, #fff);
  border: 1px dashed var(--border, #E5DDD0);
  border-radius: calc(var(--r, 10px) - 2px);
}

.booknest .bnp-coupon-label-top {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: var(--text2, #6B5D4F);
  margin-bottom: 8px;
}

.booknest .bnp-coupon-row {
  display: flex;
  gap: 8px;
}

.booknest .bnp-coupon-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border, #E5DDD0);
  border-radius: var(--r, 10px);
  background: var(--bg, #FDFAF6);
  color: var(--text, #2C2418);
  font-family: var(--fb, inherit);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  outline: none;
  transition: border-color 0.15s ease;
}

.booknest .bnp-coupon-input:focus {
  border-color: var(--pri, #B07D62);
}

/* Inherits padding/font/border-radius from .bn-btn (free plugin's base
 * button) so the appearance settings — size and primary color — apply
 * the same way they do to Next / Confirm buttons. We only layer on the
 * outline → fill behavior. */
.booknest .bnp-coupon-apply {
  border: 1px solid var(--btn-pri-bg);
  background: #fff;
  color: var(--btn-pri-bg);
  min-width: 90px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* When the input has content, fill the button using the same vars
 * .bn-btn-primary uses, so colors track the owner's button settings. */
.booknest .bnp-coupon-input:not(:placeholder-shown) + .bnp-coupon-apply {
  background: var(--btn-pri-bg);
  color: var(--btn-pri-text);
  border-color: var(--btn-pri-bg);
}

.booknest .bnp-coupon-apply:disabled {
  opacity: 0.6;
  cursor: wait;
}

.booknest .bnp-coupon-error {
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(196, 126, 126, 0.12);
  color: #8b3a3a;
  border-radius: 6px;
  font-size: 12.5px;
}

.booknest .bnp-coupon-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.booknest .bnp-coupon-applied-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text, #2C2418);
}

.booknest .bnp-coupon-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #7C9A6E;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.booknest .bnp-coupon-label {
  color: var(--text2, #6B5D4F);
}

.booknest .bnp-coupon-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  background: var(--bg, #FDFAF6);
  border-radius: 5px;
}

.booknest .bnp-coupon-remove {
  padding: 6px 12px;
  border: 1px solid var(--border, #E5DDD0);
  border-radius: var(--r, 10px);
  background: transparent;
  color: var(--text2, #6B5D4F);
  font-family: var(--fb, inherit);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.booknest .bnp-coupon-remove:hover {
  background: var(--bg, #FDFAF6);
}

/* Summary overrides */
.booknest .bn-summary .bnp-strike {
  text-decoration: line-through;
  color: var(--text3, #9A8E80);
  font-weight: 400;
}

.booknest .bn-summary .bnp-discount-val {
  color: #7C9A6E;
  font-weight: 600;
}

.booknest .bn-summary .bnp-newtotal-row {
  padding-top: 8px;
  border-top: 1px solid var(--border, #E5DDD0);
  margin-top: 4px;
}

.booknest .bn-summary .bnp-newtotal-val {
  font-weight: 700;
  font-size: var(--fs-price, 18px);
  color: var(--pri, #B07D62);
}

/* ── Payment return banner ─────────────────────────────────────────────
   Rendered as a SIBLING of the .booknest / .booknest-rooms container
   (the apps own their container's children), so it cannot rely on the
   host CSS variables — colors are self-contained. */
.bnp-pay-banner {
  margin: 0 0 18px;
  padding: 14px 18px;
  border-radius: 10px;
  font-family: "DM Sans", -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.bnp-pay-banner.bnp-pay-ok {
  background: #EEF4EB;
  border: 1px solid #7C9A6E;
  color: #4A6B3E;
}
.bnp-pay-banner.bnp-pay-bad {
  background: #FBEEEE;
  border: 1px solid #C47E7E;
  color: #8E3B3B;
}

/* ── Payment method chooser (card style) ─────────────────────────── */
.booknest .bnp-pay-choice,
.booknest-rooms .bnp-pay-choice {
  margin: 14px 0;
}
.booknest .bnp-pay-choice-opts,
.booknest-rooms .bnp-pay-choice-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
@media (max-width: 560px) {
  .booknest .bnp-pay-choice-opts,
  .booknest-rooms .bnp-pay-choice-opts { grid-template-columns: 1fr; }
}
.booknest .bnp-pay-card,
.booknest-rooms .bnp-pay-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 25px 16px;
  background: var(--surface, #fff);
  border: var(--bw, 1.5px) solid var(--border, #E5DDD0);
  border-radius: calc(var(--r, 10px) - 2px);
  cursor: pointer;
  transition: var(--tr, 0.2s);
}
.booknest .bnp-pay-card:hover,
.booknest-rooms .bnp-pay-card:hover { border-color: var(--text3, #9A8E80); }
.booknest .bnp-pay-card.selected,
.booknest-rooms .bnp-pay-card.selected {
  border-color: var(--pri, #B07D62);
  background: var(--card-sel-bg, var(--pri-l, #B07D6220));
}
.booknest .bnp-pay-card-radio,
.booknest-rooms .bnp-pay-card-radio {
  accent-color: var(--pri, #B07D62);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.booknest .bnp-pay-card-icon,
.booknest-rooms .bnp-pay-card-icon {
  color: var(--pri, #B07D62);
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.booknest .bnp-pay-card-text,
.booknest-rooms .bnp-pay-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.booknest .bnp-pay-card-title,
.booknest-rooms .bnp-pay-card-title {
  font-size: var(--fs-body, 13px);
  font-weight: 700;
  color: var(--text, #2C2418);
  line-height: 1.5rem;
}
.booknest .bnp-pay-card-desc,
.booknest-rooms .bnp-pay-card-desc {
  font-size: var(--fs-sub, 12px);
  color: var(--text3, #9A8E80);
}
