/**
 * Brist All-In-One — front-end coupon box styling.
 *
 * Single home for the custom coupon UI used by:
 *  - TourMaster  : Step 3 review sidebar  (.tourmaster-cws-coupon-toggle)
 *  - MotoPress   : checkout Price Breakdown (.mphb-cws-coupon-toggle)
 *
 * Markup (the collapsible <details>) is produced by the TourMaster core edit and
 * by BAIO_Frontend's MotoPress hooks. Units are px only. Loaded with a
 * filemtime() cache-buster, so any edit here busts the browser cache on deploy.
 */

/* ---------------------------------------------------------------------------
 * Shared — collapsible summary ("Have a coupon?" / "Click here to enter…")
 * ------------------------------------------------------------------------- */
.cws-coupon-toggle {
  margin: 15px 0;
}
.cws-coupon-toggle > .cws-coupon-summary {
  cursor: pointer;
  list-style: none;
  outline: none;
  margin-bottom: 10px;
}
.cws-coupon-toggle > .cws-coupon-summary::-webkit-details-marker {
  display: none;
}
.cws-coupon-summary .cws-coupon-summary-q,
.cws-coupon-summary .cws-coupon-summary-link {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
}
.cws-coupon-summary .cws-coupon-summary-q {
  color: #333333;
}
.cws-coupon-summary .cws-coupon-summary-link {
  color: #88b04b !important;
  margin-top: 2px;
}
.cws-coupon-summary .cws-coupon-summary-link:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------------------
 * TourMaster — Step 3 review sidebar
 * ------------------------------------------------------------------------- */
.tourmaster-cws-coupon-toggle .tourmaster-tour-booking-bar-coupon-wrap {
  border: 1px dotted #cccccc;
  padding: 18px 15px;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-align-items: stretch;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}
.tourmaster-cws-coupon-toggle input.tourmaster-tour-booking-bar-coupon[type="text"] {
  -webkit-flex: 1 1 130px;
  flex: 1 1 130px;
  min-width: 120px;
  padding: 10px 12px;
  margin: 0 10px 0 0;
  border: 1px solid #cccccc;
  background: #ffffff;
  color: #545454;
  font-size: 14px;
}
body .tourmaster-cws-coupon-toggle a.tourmaster-tour-booking-bar-coupon-validate,
body .tourmaster-cws-coupon-toggle a.tourmaster-tour-booking-bar-coupon-validate:hover,
body .tourmaster-cws-coupon-toggle a.tourmaster-tour-booking-bar-coupon-validate:focus {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 0 16px;
  background-color: #88b04b !important;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 14px;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
body .tourmaster-cws-coupon-toggle a.tourmaster-tour-booking-bar-coupon-validate:hover {
  background-color: #7a9e42 !important;
}
.tourmaster-cws-coupon-toggle .tourmaster-tour-booking-coupon-message {
  -webkit-flex: 1 0 100%;
  flex: 1 0 100%;
  margin-top: 10px;
  padding: 8px 10px;
  color: #ffffff;
  display: none;
}
.tourmaster-cws-coupon-toggle .tourmaster-tour-booking-coupon-message.tourmaster-success {
  background-color: #24a04a;
}
.tourmaster-cws-coupon-toggle .tourmaster-tour-booking-coupon-message.tourmaster-failed {
  background-color: #ba4a4a;
}

/* ---------------------------------------------------------------------------
 * MotoPress — checkout Price Breakdown
 * ------------------------------------------------------------------------- */

/* Strip the theme "card" chrome from the coupon section; keep only bottom spacing. */
#mphb-price-details #mphb-coupon-details.mphb-checkout-section {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 0 0 20px !important;
}
.mphb-cws-coupon-toggle {
  margin: 0;
}
.mphb-cws-coupon-toggle .cws-coupon-body {
  border: 1px dotted #cccccc;
  padding: 15px;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}
.mphb-cws-coupon-toggle .cws-coupon-body #mphb_coupon_code {
  flex: 1 1 150px;
  min-width: 130px;
  margin: 0 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #cccccc;
  background: #ffffff;
  font-size: 14px;
}
body .mphb-cws-coupon-toggle .cws-coupon-body .mphb-apply-coupon-code-button,
body .mphb-cws-coupon-toggle .cws-coupon-body .mphb-apply-coupon-code-button:hover,
body .mphb-cws-coupon-toggle .cws-coupon-body .mphb-apply-coupon-code-button:focus {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background-color: #88b04b !important;
  border-color: #88b04b !important;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  border-radius: 3px;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}
body .mphb-cws-coupon-toggle .cws-coupon-body .mphb-apply-coupon-code-button:hover {
  background-color: #7a9e42 !important;
  border-color: #7a9e42 !important;
}
.mphb-cws-coupon-toggle .cws-coupon-body .mphb-coupon-message {
  flex: 1 0 100%;
  margin: 10px 0 0;
}
.mphb-cws-coupon-toggle .cws-coupon-body .mphb-coupon-message.mphb-hide {
  display: none;
}

/* ---------------------------------------------------------------------------
 * Shared — drop the 50% coupon box to full width on small screens.
 * ------------------------------------------------------------------------- */
@media (max-width: 782px) {
  .tourmaster-cws-coupon-toggle .tourmaster-tour-booking-bar-coupon-wrap,
  .mphb-cws-coupon-toggle .cws-coupon-body {
    width: 100%;
  }
}
