/* ==========================================================================
   GPL Promo Banner — Sober bar style (v1.9.0)
   Slim single-line bar + floating discount bubble when minimized.
   All classes are prefixed with .gplc-sb to avoid clashes with the theme.
   ========================================================================== */

.gplc-sb,
body .gplc-sb-bubble {
    --gplc-sb-bg: #0b0b0b;
    --gplc-sb-text: #ffffff;
    --gplc-sb-accent: #ffd400;
    --gplc-sb-accent-text: #0b0b0b;
    --gplc-sb-line: rgba(255, 255, 255, 0.12);
    --gplc-sb-soft: rgba(255, 255, 255, 0.06);
    font-family: inherit;
    box-sizing: border-box;
}

.gplc-sb *,
body .gplc-sb-bubble * {
    box-sizing: border-box;
}

.gplc-sb[hidden],
body .gplc-sb-bubble[hidden],
.gplc-sb [hidden] {
    display: none !important;
}

/* --------------------------------------------------------------------------
   Bar
   -------------------------------------------------------------------------- */
.gplc-sb {
    position: relative;
    z-index: 50;
    width: 100%;
    background: var(--gplc-sb-bg);
    color: var(--gplc-sb-text);
    border-bottom: 1px solid var(--gplc-sb-line);
    line-height: 1.2;
    -webkit-font-smoothing: antialiased;
}

.gplc-sb__inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 52px;
    padding: 0 14px 0 0;
}

/* Centered content (default): content sits in a 1440px column; the accent
   color runs from the title block to the left edge of the screen and the
   dark background fills the rest. */
.gplc-sb--centered {
    overflow: hidden;
}

.gplc-sb--centered .gplc-sb__inner {
    max-width: 1440px;
    margin: 0 auto;
}

.gplc-sb--centered .gplc-sb__brand {
    position: relative;
}

.gplc-sb--centered .gplc-sb__brand::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 100%;
    width: 100vw;
    background: var(--gplc-sb-accent);
    pointer-events: none;
}

/* Title block (solid accent, straight edges) */
.gplc-sb__brand {
    align-self: stretch;
    display: flex;
    align-items: center;
    padding: 0 26px;
    background: var(--gplc-sb-accent);
    color: var(--gplc-sb-accent-text);
}

.gplc-sb__title {
    font-size: 15px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Discount */
.gplc-sb__deal {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gplc-sb__pct {
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--gplc-sb-accent);
    line-height: 1;
}

.gplc-sb__deal-txt {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gplc-sb__off {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.gplc-sb__sub {
    font-size: 12px;
    opacity: 0.72;
    white-space: nowrap;
}

/* Countdown */
.gplc-sb__timer {
    display: flex;
    align-items: center;
    gap: 5px;
    padding-left: 18px;
    border-left: 1px solid var(--gplc-sb-line);
}

.gplc-sb__ends {
    margin-right: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.6;
    white-space: nowrap;
}

.gplc-sb__seg {
    display: inline-flex;
    align-items: baseline;
    gap: 1px;
    min-width: 36px;
    justify-content: center;
    padding: 4px 7px;
    font-size: 10.5px;
    font-weight: 700;
    /* Unit letters (d / h / m): soft gray */
    color: rgba(255, 255, 255, 0.5);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.02) 100%),
        var(--gplc-sb-timer-bg, #1c1c1c);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 1px 2px rgba(0, 0, 0, 0.5);
}

.gplc-sb__seg b {
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    /* Numbers: bright */
    color: var(--gplc-sb-timer-text, #ffffff);
}

.gplc-sb__spacer {
    flex: 1 1 auto;
}

/* Coupon chips */
.gplc-sb__codes {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gplc-sb .gplc-sb__code {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    height: 28px;
    padding: 0 12px;
    font: inherit;
    color: var(--gplc-sb-text);
    background: var(--gplc-sb-soft);
    border: 1px solid var(--gplc-sb-line);
    border-radius: 999px;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.gplc-sb .gplc-sb__code:hover,
.gplc-sb .gplc-sb__code:focus-visible {
    color: var(--gplc-sb-text);
    border-color: var(--gplc-sb-accent);
    background: rgba(255, 255, 255, 0.09);
}

.gplc-sb__code-label,
.gplc-sb__code-value,
.gplc-sb__cta-text {
    white-space: nowrap;
}

.gplc-sb__code-label {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    opacity: 0.6;
}

.gplc-sb__code-value {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--gplc-sb-accent);
}

.gplc-sb__icon {
    flex: 0 0 auto;
    display: block;
}

.gplc-sb .gplc-sb__code .gplc-sb__icon {
    color: var(--gplc-sb-accent);
}

.gplc-sb__copied {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--gplc-sb-accent-text);
    background: var(--gplc-sb-accent);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.gplc-sb .gplc-sb__code.is-copied .gplc-sb__copied {
    opacity: 1;
}

/* CTA buttons */
.gplc-sb__ctas {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gplc-sb .gplc-sb__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    color: var(--gplc-sb-accent-text);
    background: var(--gplc-sb-accent);
    border: 2px solid var(--gplc-sb-accent);
    border-radius: 999px;
    transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.gplc-sb .gplc-sb__cta:hover,
.gplc-sb .gplc-sb__cta:focus-visible {
    color: var(--gplc-sb-accent-text);
    filter: brightness(1.08);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Second button: outlined, so the two offers read as primary / secondary */
.gplc-sb .gplc-sb__cta--2 {
    color: var(--gplc-sb-accent);
    background: transparent;
}

.gplc-sb .gplc-sb__cta--2:hover,
.gplc-sb .gplc-sb__cta--2:focus-visible {
    color: var(--gplc-sb-accent-text);
    background: var(--gplc-sb-accent);
}

/* Minimize */
.gplc-sb .gplc-sb__min {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    color: var(--gplc-sb-text);
    background: var(--gplc-sb-soft);
    border: 1px solid var(--gplc-sb-line);
    border-radius: 50%;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.gplc-sb .gplc-sb__min:hover,
.gplc-sb .gplc-sb__min:focus-visible {
    color: var(--gplc-sb-text);
    background: var(--gplc-sb-soft);
    border-color: var(--gplc-sb-accent);
}

.gplc-sb button:focus-visible,
.gplc-sb a:focus-visible,
body .gplc-sb-bubble:focus-visible {
    outline: 2px solid var(--gplc-sb-accent);
    outline-offset: 2px;
}

/* Theme-proof reset: some themes (e.g. WoodMart) style every <button> with
   background, min-height, padding and uppercase text. These selectors are
   more specific than :is(.btn, button, [type="button"]). */
.gplc-sb .gplc-sb__code,
.gplc-sb .gplc-sb__min,
body .gplc-sb-bubble {
    min-height: 0;
    vertical-align: baseline;
    font-style: normal;
    line-height: 1.2;
    text-transform: none;
    box-shadow: none;
    text-shadow: none;
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Floating bubble (minimized state)
   -------------------------------------------------------------------------- */
body .gplc-sb-bubble {
    position: fixed;
    bottom: 20px;
    z-index: 99990;
    gap: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin: 0;
    padding: 0;
    color: var(--gplc-sb-text);
    background: var(--gplc-sb-bg);
    border: 2px solid var(--gplc-sb-accent);
    border-radius: 50%;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    animation: gplc-sb-pop 0.25s ease-out;
    transition: transform 0.15s ease;
}

.gplc-sb-bubble--left  { left: 20px; }
.gplc-sb-bubble--right { right: 20px; }

body .gplc-sb-bubble:hover {
    color: var(--gplc-sb-text);
    background: var(--gplc-sb-bg);
    transform: scale(1.06);
}

.gplc-sb-bubble__pct {
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    color: var(--gplc-sb-accent);
}

.gplc-sb-bubble__off {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.gplc-sb-bubble__tag {
    position: absolute;
    top: -6px;
    right: -6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: var(--gplc-sb-accent-text);
    background: var(--gplc-sb-accent);
    border: 2px solid var(--gplc-sb-bg);
    border-radius: 50%;
}

@keyframes gplc-sb-pop {
    from { transform: scale(0.6); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    body .gplc-sb-bubble,
    .gplc-sb .gplc-sb__cta,
    .gplc-sb__code { animation: none; transition: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
/* Laptop widths: drop secondary text first, never wrap. */
@media (max-width: 1400px) {
    .gplc-sb__sub   { display: none; }
}

@media (max-width: 1320px) {
    .gplc-sb__inner       { gap: 14px; }
    .gplc-sb__brand       { padding: 0 18px; }
    .gplc-sb__code-label  { display: none; }
    .gplc-sb .gplc-sb__code { padding: 0 11px; }
}

@media (max-width: 1080px) {
    .gplc-sb__codes { display: none; }
    .gplc-sb__ends  { display: none; }
}

/* Tablet / mobile: two rows. Row 1 = title, discount, countdown, minimize.
   Row 2 = CTA buttons. Coupon chips are hidden here because the buttons
   already apply the coupon. */
@media (max-width: 900px) {
    .gplc-sb__inner {
        flex-wrap: wrap;
        gap: 8px 10px;
        min-height: 0;
        padding: 8px 10px 10px;
    }
    .gplc-sb__brand {
        align-self: center;
        padding: 5px 9px;
        border-radius: 4px;
    }
    .gplc-sb--centered .gplc-sb__brand::before { display: none; }
    .gplc-sb__title  { font-size: 12px; }
    .gplc-sb__pct    { font-size: 21px; }
    .gplc-sb__timer  { padding-left: 0; border-left: 0; gap: 4px; }
    .gplc-sb__seg    { min-width: 0; padding: 3px 5px; }
    .gplc-sb__seg b  { font-size: 13px; }
    .gplc-sb__spacer,
    .gplc-sb__codes  { display: none; }
    .gplc-sb .gplc-sb__min { order: 5; margin-left: auto; width: 30px; height: 30px; }
    .gplc-sb__ctas {
        order: 10;
        flex: 1 1 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .gplc-sb .gplc-sb__cta:only-child { grid-column: 1 / -1; }
    .gplc-sb .gplc-sb__cta { padding: 0 8px; font-size: 12px; }
}

@media (max-width: 480px) {
    .gplc-sb__ends   { display: none; }
    .gplc-sb__off    { font-size: 11px; }
    .gplc-sb .gplc-sb__cta { letter-spacing: 0; }
    .gplc-sb .gplc-sb__cta .gplc-sb__icon { display: none; }
    body .gplc-sb-bubble { width: 58px; height: 58px; bottom: 16px; }
    .gplc-sb-bubble--left  { left: 16px; }
    .gplc-sb-bubble--right { right: 16px; }
    .gplc-sb-bubble__pct { font-size: 16px; }
}

/* Very narrow phones (≤ 400px): keep title, discount, countdown and the
   minimize button on the first row. */
@media (max-width: 400px) {
    .gplc-sb__inner     { gap: 8px 7px; padding: 8px 8px 10px; }
    .gplc-sb__brand     { padding: 4px 7px; }
    .gplc-sb__title     { font-size: 11px; letter-spacing: 0.3px; }
    .gplc-sb__pct       { font-size: 19px; }
    .gplc-sb__deal      { gap: 5px; }
    .gplc-sb__timer     { gap: 3px; }
    .gplc-sb__seg       { padding: 3px 4px; }
    .gplc-sb__seg b     { font-size: 12px; }
    .gplc-sb .gplc-sb__min { width: 28px; height: 28px; }
}
