.wcbbg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: #eef7ee;
  border: 1px solid #cde8cd;
}

.wcbbg-muted { color: #888; }

.wcbbg-item-cta {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wcbbg-small-note {
  font-size: 12px;
  color: #666;
}

.wcbbg-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 99999;
}

.wcbbg-modal.is-open { display: block; }

.wcbbg-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.wcbbg-modal__dialog {
  position: relative;
  max-width: 520px;
  margin: 8vh auto;
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.wcbbg-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

#wcbbg_note {
  width: 100%;
}

#wcbbg-form input[type="text"],
#wcbbg-form input[type="tel"],
#wcbbg-form textarea {
  width: 100%;
}

.wcbbg-form-row {
  margin-bottom: 16px;
}

.wcbbg-field-error {
  display: block;
  margin-top: 6px;
  color: #b42318;
  font-size: 13px;
  line-height: 1.4;
}

.wcbbg-field-invalid {
  border-color: #d92d20 !important;
  box-shadow: 0 0 0 1px rgba(217, 45, 32, 0.15);
}

.wcbbg-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wcbbg-message {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #1f2937;
  line-height: 1.5;
}

.wcbbg-message.is-success {
  background: #eef7ee;
  border: 1px solid #cde8cd;
  color: #1f5130;
}

.wcbbg-message.is-error {
  background: #fdecec;
  border: 1px solid #f5b5b5;
  color: #8a1f1f;
}


.wcbbg-product-badge {
  padding: 10px 12px;
  border: 1px dashed #cde8cd;
  background: #f7fff7;
  border-radius: 10px;
}

/* Product image overlay badge */
.wcbbg-image-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 150px;
  pointer-events: none;
  background: transparent;
}

.wcbbg-image-badge img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

/* ── Product loop badge (shop / category / home) ─────────── */
li.product {
  position: relative;
}

.wcbbg-loop-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;
  width: 80px;
  pointer-events: none;
  background: transparent;
}

.wcbbg-loop-badge img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
}
/* ────────────────────────────────────────────────────────── */

/* ── Orders list column ───────────────────────────────────── */
.wcbbg-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wcbbg-col__logo {
  width: 54px;
  height: auto;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.18));
}

.wcbbg-col__btn {
  display: inline-block;
  padding: 5px 13px;
  background: #1a3c5e;
  color: #fff !important;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  line-height: 1.5;
}

.wcbbg-col__btn:hover {
  background: #c9960a;
  color: #1a3c5e !important;
}

.wcbbg-col-none {
  color: #bbb;
  font-size: 15px;
}
/* ────────────────────────────────────────────────────────── */

.wcbbg-order-item-wrap{
  margin-top: 10px;
}

.wcbbg-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px !important;
  border-radius: 8px;
  font-weight: 600;
}

.wcbbg-note{
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wcbbg-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e9f7ef;
  font-size: 13px;
}


/* =========================================================
   WCBBG Modal - Responsive (mobile first)
   ========================================================= */

.wcbbg-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none; /* open via JS by setting display:block or adding a class */
}

.wcbbg-modal[aria-hidden="false"] {
  display: block;
}

/* overlay */
.wcbbg-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* dialog wrapper */
.wcbbg-modal__dialog {
  position: relative;
  margin: 6vh auto 0;
  width: 92vw;
  max-width: 520px;
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);

  /* make it responsive + scrollable */
  max-height: 88vh;
  overflow: auto;

  /* prevent content from sticking to edges */
  box-sizing: border-box;
}

.wcbbg-modal__title {
  margin: -22px -22px 18px;
  padding: 18px 56px 18px 22px;
  background: #2f6388;
  color: #fff !important;
  border-radius: 12px 12px 0 0;
  font-size: 30px;
  line-height: 1.2;
}

.wcbbg-modal__title,
.wcbbg-modal__title a,
.wcbbg-modal__title strong {
  color: #fff !important;
}

/* bigger screens */
@media (min-width: 768px) {
  .wcbbg-modal__dialog {
    padding: 22px 22px 18px;
    margin-top: 10vh;
  }
}

@media (max-width: 767px) {
  .wcbbg-modal__title {
    margin: -18px -16px 16px;
    padding: 16px 52px 16px 16px;
    font-size: 24px;
  }
}

/* close button */
.wcbbg-modal__close {
  color: #fff !important;
  z-index: 2;
}
.wcbbg-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 10px;
}

.wcbbg-modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* title */
h5#wcbbg-modal-title {
  margin: 0 40px 14px 0;
  font-size: 18px;
  color: #FFF !important;
}

/* product row */
.wcbbg-modal__product {
  background: #f7f7f7;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* form elements */
#wcbbg-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

#wcbbg-form textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid #dcdcdc;
  border-radius: 10px;
  box-sizing: border-box;
}

#wcbbg-form textarea:focus {
  outline: none;
  border-color: #2271b1; /* WP blue */
  box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.18);
}

/* buttons - responsive stack */
.wcbbg-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.wcbbg-actions .button {
  flex: 1 1 160px;
}

/* On very small screens, make buttons full width */
@media (max-width: 420px) {
  .wcbbg-actions .button {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* message box */
.wcbbg-message {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f0f6ff;
  border: 1px solid #cfe3ff;
  word-break: break-word;
}

/* Final modal UI overrides */
#wcbbg-modal .wcbbg-modal__dialog {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  border: 1px solid rgba(47, 99, 136, 0.14);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(12, 31, 45, 0.22);
}

#wcbbg-modal .wcbbg-modal__title {
  margin: -22px -22px 18px;
  padding: 18px 56px 18px 22px;
  background: linear-gradient(135deg, #1f577b 0%, #3b769d 100%);
  border-radius: 18px 18px 0 0;
  color: #fff !important;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.12);
}

#wcbbg-modal .wcbbg-modal__close {
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff !important;
  z-index: 2;
  transition: background 0.2s ease, transform 0.2s ease;
}

#wcbbg-modal .wcbbg-modal__close:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.03);
}

#wcbbg-modal .wcbbg-modal__product {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: #edf5fa;
  border: 1px solid #d6e6f1;
  border-radius: 12px;
  color: #21465f;
  font-size: 14px;
}

#wcbbg-modal .wcbbg-modal__product strong {
  color: #17364a;
}

#wcbbg-modal .wcbbg-modal-product-name {
  font-weight: 600;
  color: #0f2d41;
}

#wcbbg-form p {
  margin: 0 0 16px;
}

#wcbbg-form label {
  display: inline-block;
  margin-bottom: 8px;
  color: #17364a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

#wcbbg-form .required {
  color: #c2410c;
  font-weight: 700;
}

#wcbbg-form input[type="text"],
#wcbbg-form input[type="tel"],
#wcbbg-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #cbd8e3;
  border-radius: 12px;
  background: #fff;
  color: #183246;
  font-size: 15px;
  line-height: 1.45;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#wcbbg-form textarea {
  min-height: 120px;
}

#wcbbg-form input[type="text"]:focus,
#wcbbg-form input[type="tel"]:focus,
#wcbbg-form textarea:focus {
  outline: none;
  border-color: #3b769d;
  box-shadow: 0 0 0 4px rgba(59, 118, 157, 0.14);
  background: #fff;
}

#wcbbg-modal .wcbbg-field-error {
  margin-top: 6px;
  color: #b42318;
  font-size: 13px;
  line-height: 1.4;
}

#wcbbg-form .wcbbg-field-invalid {
  border-color: #d92d20 !important;
  background: #fff8f7;
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.10);
}

#wcbbg-form .wcbbg-message {
  margin-top: 6px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

#wcbbg-form .wcbbg-message.is-success {
  background: #edf9f1;
  border: 1px solid #b9e3c5;
  color: #166534;
}

#wcbbg-form .wcbbg-message.is-error {
  background: #fff1f1;
  border: 1px solid #f0b7b7;
  color: #a61b1b;
}

#wcbbg-form .wcbbg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

#wcbbg-form .button {
  min-width: 140px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#wcbbg-form .button:hover {
  transform: translateY(-1px);
}

#wcbbg-form .button:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(59, 118, 157, 0.16);
}

#wcbbg-form .button.button-primary {
  background: linear-gradient(135deg, #1f577b 0%, #3b769d 100%);
  color: #fff;
  box-shadow: 0 10px 22px rgba(31, 87, 123, 0.22);
}

#wcbbg-form .button.button-primary:hover {
  background: linear-gradient(135deg, #184662 0%, #2f678c 100%);
}

#wcbbg-form .button.wcbbg-cancel {
  background: #8f98a1;
  color: #fff;
}

#wcbbg-form .button.wcbbg-cancel:hover {
  background: #78828c;
}

#wcbbg-form .button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 767px) {
  #wcbbg-modal .wcbbg-modal__dialog {
    width: calc(100vw - 20px);
    margin-top: 3vh;
    border-radius: 16px;
    padding: 18px 14px 16px;
  }

  #wcbbg-modal .wcbbg-modal__title {
    margin: -18px -14px 16px;
    padding: 16px 52px 16px 16px;
    border-radius: 16px 16px 0 0;
    font-size: 24px;
  }

  #wcbbg-modal .wcbbg-modal__product {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  #wcbbg-form .wcbbg-actions {
    flex-direction: column;
    align-items: stretch;
  }

  #wcbbg-form .button {
    width: 100%;
    min-width: 0;
  }
}
