/**
 * TravelBaby Coupons — booking widget styles.
 */
.tb-coupon-widget {
    margin: 1rem 0 1.25rem;
    padding: 1rem 1.1rem;
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    border-radius: 10px;
    font-family: inherit;
}
.tb-coupon-widget__label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6d28d9;
    margin-bottom: 0.5rem;
}
.tb-coupon-widget__row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}
.tb-coupon-widget__input {
    flex: 1 1 auto;
    padding: 0.55rem 0.75rem;
    border: 1.5px solid #c4b5fd;
    border-radius: 6px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #ffffff;
}
.tb-coupon-widget__input:focus {
    outline: none;
    border-color: #6d28d9;
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.15);
}
.tb-coupon-widget__apply {
    padding: 0.55rem 1.1rem;
    background: #6d28d9;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}
.tb-coupon-widget__apply:hover:not(:disabled) {
    background: #5b21b6;
}
.tb-coupon-widget__apply:disabled {
    opacity: 0.6;
    cursor: wait;
}
.tb-coupon-widget__status {
    margin-top: 0.5rem;
    font-size: 0.88rem;
    min-height: 1.2em;
}
.tb-coupon-widget__status--info { color: #475569; }
.tb-coupon-widget__status--error { color: #b91c1c; }
.tb-coupon-widget__status--success { color: #15803d; }
.tb-coupon-widget__status--free {
    color: #15803d;
    font-weight: 700;
}
.tb-coupon-widget--applied .tb-coupon-widget__input {
    background: #f0fdf4;
    border-color: #86efac;
}
.tb-coupon-widget--free {
    background: linear-gradient(135deg, #f0fdf4 0%, #faf5ff 100%);
    border-color: #86efac;
}

/* Modal-specific tweaks — !important is used here intentionally to
   override WPRentals theme styles that apply broad input/button rules
   in the booking modal context. Without it, theme rules win because
   the theme stylesheet loads after ours.

   Fixed input + button geometry so they always match visually:
   - 48px tall on both
   - 16px font on both
   - matching vertical padding via line-height + border-box */
.tb-coupon-widget--in-modal {
    margin: 1rem 0 1.25rem !important;
    padding: 1rem 1.1rem !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__label {
    display: block !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.6px !important;
    margin-bottom: 0.6rem !important;
    line-height: 1.3 !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__row {
    display: flex !important;
    gap: 0.6rem !important;
    align-items: stretch !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__input {
    flex: 1 1 auto !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 14px !important;
    font-size: 16px !important;
    line-height: 48px !important;     /* center text vertically */
    text-transform: none !important;
    letter-spacing: 1px !important;
    box-sizing: border-box !important;
    border: 1.5px solid #c4b5fd !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    color: #1e293b !important;
    margin: 0 !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__input::placeholder {
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    color: #94a3b8 !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__apply {
    flex: 0 0 auto !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 22px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    min-width: 110px !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: #6d28d9 !important;
    color: #ffffff !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    margin: 0 !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__apply:hover:not(:disabled) {
    background: #5b21b6 !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__apply:disabled {
    opacity: 0.6 !important;
    cursor: wait !important;
}

/* Remove button — outline / ghost variant. Shows after a successful
   apply, replacing the Apply button. */
.tb-coupon-widget--in-modal .tb-coupon-widget__remove {
    flex: 0 0 auto !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 22px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    min-width: 110px !important;
    box-sizing: border-box !important;
    border: 1.5px solid #b91c1c !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    color: #b91c1c !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    margin: 0 !important;
    text-transform: none !important;
    letter-spacing: 0.3px !important;
    transition: background .15s, color .15s !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__remove:hover:not(:disabled) {
    background: #b91c1c !important;
    color: #ffffff !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__remove:disabled {
    opacity: 0.6 !important;
    cursor: wait !important;
}

/* When a coupon is applied + locked, the input shows the code in a
   muted style so it's clearly read-only. */
.tb-coupon-widget--in-modal.tb-coupon-widget--locked .tb-coupon-widget__input {
    background: #f5f3ff !important;
    color: #581c87 !important;
    cursor: not-allowed !important;
    border-color: #ddd6fe !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__status {
    font-size: 1.05rem !important;
    margin-top: 0.85rem !important;
    line-height: 1.5 !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__status strong {
    font-weight: 800 !important;
    font-size: 1.1rem !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__status--success,
.tb-coupon-widget--in-modal .tb-coupon-widget__status--free {
    background: #ecfdf5 !important;
    border: 1px solid #86efac !important;
    border-radius: 8px !important;
    padding: 0.85rem 1rem !important;
    color: #166534 !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__status--success::before,
.tb-coupon-widget--in-modal .tb-coupon-widget__status--free::before {
    content: "\2713\00a0\00a0";
    color: #16a34a !important;
    font-weight: 800 !important;
    font-size: 1.2rem !important;
}
.tb-coupon-widget--in-modal .tb-coupon-widget__status--error {
    background: #fef2f2 !important;
    border: 1px solid #fca5a5 !important;
    border-radius: 8px !important;
    padding: 0.7rem 1rem !important;
    color: #991b1b !important;
}
