/* TopBox Promo – front-end styles
   ------------------------------------------------- */

.tbp-stack {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: var(--tbp-stack-gap, 0px);
}

.tbp-box {
    position: relative;
    padding: 12px 56px;
    text-align: center;
    font-size: 15px;
    line-height: 1.45;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    box-sizing: border-box;
    animation: tbpSlideIn .25s ease-out;
}

/* Only the first banner in the stack gets the drop shadow — prevents
   the shadow from bleeding between stacked boxes. */
.tbp-stack .tbp-box:not(:first-child) {
    box-shadow: none;
}

.tbp-box * { box-sizing: border-box; }

.tbp-box p {
    margin: 0;
    padding: 0;
}

/* Inline row: keep message text and coupon button on the same line,
   centered. Wraps to a second line only when the viewport is genuinely
   too narrow to fit them side-by-side. */
.tbp-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    width: 100%;
}

.tbp-message {
    display: inline;
}

/* The WP editor wraps content in a <p> which is block-level by default.
   Force it inline so it shares a row with the coupon button, and strip
   the editor's default vertical margins. */
.tbp-message,
.tbp-message > p {
    display: inline;
    margin: 0;
    padding: 0;
}

.tbp-box a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.tbp-box a:hover { opacity: .85; }

.tbp-coupon-btn {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 4px;
    color: inherit !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: .95em;
    line-height: 1.2;
    transition: background-color .15s, border-color .15s, transform .1s;
    vertical-align: baseline;
}

.tbp-coupon-btn:hover,
.tbp-coupon-btn:focus {
    background: rgba(255, 255, 255, .3);
    border-color: rgba(255, 255, 255, .75);
    outline: none;
}

.tbp-coupon-btn:active {
    transform: translateY(1px);
}

/* Light-background styles need a darker button treatment */
.tbp-style-minimal-light .tbp-coupon-btn,
.tbp-style-warning-amber .tbp-coupon-btn {
    background: rgba(0, 0, 0, .08);
    border-color: rgba(0, 0, 0, .35);
}
.tbp-style-minimal-light .tbp-coupon-btn:hover,
.tbp-style-warning-amber .tbp-coupon-btn:hover {
    background: rgba(0, 0, 0, .15);
    border-color: rgba(0, 0, 0, .55);
}

.tbp-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: .7;
    padding: 4px 10px;
    border-radius: 3px;
    transition: opacity .15s, background-color .15s;
}

.tbp-close:hover,
.tbp-close:focus {
    opacity: 1;
    background: rgba(0, 0, 0, .12);
    outline: none;
}

/* Admin bar offsets when logged in */
body.admin-bar .tbp-stack { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .tbp-stack { top: 46px; }
    .tbp-box { font-size: 14px; padding: 10px 48px; }
}

@keyframes tbpSlideIn {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

/* ------------------------------------------------------------------
   10 predefined styles
   ------------------------------------------------------------------ */

.tbp-style-alert-red       { background: #dc2626; color: #fff; }
.tbp-style-info-blue       { background: #2563eb; color: #fff; }
.tbp-style-success-green   { background: #16a34a; color: #fff; }
.tbp-style-warning-amber   { background: #f59e0b; color: #111827; }
.tbp-style-minimal-dark    { background: #111827; color: #fff; }
.tbp-style-minimal-light   { background: #fff; color: #111827; border-bottom: 1px solid #e5e7eb; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.tbp-style-gradient-sunset { background: linear-gradient(90deg, #f97316 0%, #db2777 100%); color: #fff; }
.tbp-style-gradient-ocean  { background: linear-gradient(90deg, #0ea5e9 0%, #14b8a6 100%); color: #fff; }
.tbp-style-cobalt          { background: #0047AB; color: #fff; }
.tbp-style-postguard       { background: #e87722; color: #fff; }
