/* ==========================================================================
   Black Month-kampanjebar og tilbudskort
   Lastes bare når kampanjen er aktiv (se layouts/front/master.blade.php)
   ========================================================================== */

.bwbar {
    --bw-amber: #e9a45e;
    --bw-amber-ink: #1a1208;
    --bw-amber-soft: rgba(26, 18, 8, .72);

    display: block;
    position: relative;
    z-index: 2;
    background: var(--bw-amber);
    color: var(--bw-amber-ink);
    text-decoration: none;
    font-size: .8125rem;
    line-height: 1;
}

.bwbar:hover,
.bwbar:focus {
    color: var(--bw-amber-ink);
    text-decoration: none;
}

.bwbar [hidden],
.bwo [hidden] {
    display: none !important;
}

.bwbar-inner {
    min-height: 42px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    column-gap: 16px;
}

/* venstre: kampanjemerke */
.bwbar-tag {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--bw-amber-soft);
    white-space: nowrap;
}

.bwbar-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--bw-amber-ink);
    animation: bwbar-pulse 2.4s ease-in-out infinite;
}

@keyframes bwbar-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .35; transform: scale(.8); }
}

/* midten: budskap */
.bwbar-msg {
    text-align: center;
    font-size: .8125rem;
    font-weight: 500;
    letter-spacing: .005em;
    white-space: nowrap;
}

.bwbar-msg strong {
    font-weight: 700;
}

.bwbar-msg-mobile {
    display: none;
}

/* høyre: nedtelling + CTA */
.bwbar-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 18px;
}

.bwbar-countdown {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.bwbar-num {
    font-weight: 600;
    letter-spacing: .02em;
}

.bwbar-lab {
    font-size: .75rem;
    font-weight: 400;
    opacity: .72;
}

.bwbar-lab-mobile {
    display: none;
    font-size: .71875rem;
    font-weight: 500;
    opacity: .72;
}

.bwbar-sep {
    opacity: .4;
}

.bwbar-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(26, 18, 8, .9);
    color: #f7ede0;
    font-size: .71875rem;
    font-weight: 600;
    letter-spacing: .04em;
    white-space: nowrap;
    transition: background-color .18s ease;
}

.bwbar-cta svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.9;
    transition: transform .18s ease;
}

.bwbar:hover .bwbar-cta {
    background: var(--bw-amber-ink);
}

.bwbar:hover .bwbar-cta svg {
    transform: translateX(2px);
}

/* ==========================================================================
   Tilbudskort under «Legg i handlekurv»
   ========================================================================== */

.bwo {
    margin: 0 0 1.25rem;
    padding: 14px 15px 13px;
    border-radius: 13px;
    border: 1px solid rgba(233, 164, 94, .45);
    background: linear-gradient(135deg, #fdf6ec 0%, #fbf0de 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 1px 2px rgba(120, 80, 30, .05);
    color: #1f1b17;
}

.bwo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.bwo-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .59375rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #8a5a24;
}

.bwo-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #b4742f;
    animation: bwbar-pulse 2.4s ease-in-out infinite;
}

.bwo-pill {
    padding: 3px 9px;
    border-radius: 999px;
    background: #e9a45e;
    color: #1a1208;
    font-size: .59375rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.bwo-copy {
    margin: 9px 0 12px;
    font-size: .78125rem;
    line-height: 1.45;
    color: #5c4a34;
}

.bwo-copy strong {
    font-weight: 600;
    color: #3a2f22;
}

.bwo-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.bwo-timer {
    display: flex;
    gap: 5px;
    font-variant-numeric: tabular-nums;
}

.bwo-unit {
    min-width: 38px;
    padding: 4px 6px 3px;
    border: 1px solid rgba(233, 164, 94, .42);
    border-radius: 7px;
    background: #fff;
    text-align: center;
    box-shadow: 0 1px 2px rgba(120, 80, 30, .06);
}

.bwo-unit b {
    display: block;
    font-size: .84375rem;
    font-weight: 650;
    line-height: 1.1;
    color: #2b241d;
}

.bwo-unit span {
    display: block;
    margin-top: 2px;
    font-size: .5rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #9a7b52;
}

.bwo-link {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .71875rem;
    font-weight: 600;
    color: #8a5a24;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.bwo-link:hover {
    color: #5f3c14;
}

.bwo-link svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* ==========================================================================
   Mobil
   ========================================================================== */

@media (max-width: 991.98px) {
    .bwbar-inner {
        min-height: 38px;
        grid-template-columns: minmax(0, 1fr) auto auto;
        column-gap: 12px;
    }

    .bwbar-tag {
        display: none;
    }

    .bwbar-msg {
        text-align: left;
        font-size: .71875rem;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .bwbar-msg-desktop {
        display: none;
    }

    .bwbar-msg-mobile {
        display: inline;
    }

    .bwbar-right {
        gap: 8px;
    }

    .bwbar-countdown {
        gap: 5px;
    }

    .bwbar-num {
        font-size: .71875rem;
    }

    .bwbar-lab {
        display: none;
    }

    .bwbar-lab-mobile {
        display: inline;
    }

    .bwbar-cta {
        padding: 0;
        background: none;
        color: var(--bw-amber-ink);
    }

    .bwbar:hover .bwbar-cta {
        background: none;
    }

    .bwbar-cta-label {
        display: none;
    }

    .bwbar-cta svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 360px) {
    .bwbar-msg,
    .bwbar-num {
        font-size: .65625rem;
    }

    .bwo-unit {
        min-width: 34px;
    }

    .bwo-unit b {
        font-size: .78125rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bwbar-dot,
    .bwo-dot {
        animation: none;
    }

    .bwbar-cta svg {
        transition: none;
    }
}

@media print {
    .bwbar {
        display: none;
    }
}
