/**
 * Buyer-protection badges.
 *
 * Loaded on every frontend page by this module's layout/default.xml, NOT from
 * the badge template. That is deliberate: VerifiedBadge::getBadgeHtml() is
 * called straight from theme templates (cart line item, seller list, the
 * marketplace landing page) which never render the badge block's own template,
 * so any <style> living in that template would be missing on those pages.
 *
 * A real stylesheet rather than inline style attributes, because checkout
 * pages enforce a Content-Security-Policy that inline styles can fall foul of.
 *
 * @category  BookPound
 * @package   BookPound_SellerBond
 */
.bookpound-badge {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.bookpound-badge:focus {
    outline: none;
}

.bookpound-badge:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.bookpound-badge-icon {
    font-weight: 700;
}

/* The small "?" that tells buyers the badge explains itself. */
.bookpound-badge-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    margin-left: 2px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 10px;
    line-height: 1;
}

/* The explanation. Hover (mouse) or focus (a tap on a phone or tablet, or the
   keyboard) opens it INSIDE the badge, on its own line under the label - the
   same on every screen size. Deliberately not a floating tooltip: a floating
   box gets cut off by a card, cart row or carousel edge, and on a phone it can
   run off the screen. Tapping anywhere else closes it again. */
.bookpound-badge-tip {
    display: none;
    box-sizing: border-box;
    font-weight: 400;
    line-height: 1.45;
    white-space: normal;
    text-align: left;
}

.bookpound-badge:hover,
.bookpound-badge:focus {
    border-radius: 10px;
}

.bookpound-badge:hover .bookpound-badge-tip,
.bookpound-badge:focus .bookpound-badge-tip {
    display: block;
    flex-basis: 100%;
    max-width: min(240px, calc(100vw - 64px));
    padding: 3px 0 2px;
    border-top: 1px solid currentColor;
}

/* Seller holds the full deposit: the delivery fee is refunded too. */
.bookpound-badge--protected {
    background: #e6f7ec;
    border-color: #bfe5cc;
    color: #1e7e34;
}

/* No full deposit behind this seller: a caution, in amber. */
.bookpound-badge--limited {
    background: #fff4d6;
    border-color: #f0c24b;
    color: #8a5a00;
}

/* The pre-2026-09-12 class name, kept so a page still cached with the old
   markup keeps its styling until the cache turns over. */
.bookpound-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    background: #e6f7ec;
    color: #1e7e34;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
}
