/* ============================================================
   Brand Manager – Toplist Stylesheet
   ============================================================ */

/* ── BLYCC colour variant (bestluxuryyachtchartercompanies.com) ─ */
.bm-toplist-wrapper--blycc {
    --bm-primary:      #1863DC;
    --bm-primary-dark: #1452b8;
    --bm-bg-first:     #f0f5fe;
}

/* ── Reset / base ──────────────────────────────────────────── */
.bm-toplist-wrapper *,
.bm-toplist-wrapper *::before,
.bm-toplist-wrapper *::after {
    box-sizing: border-box;
}

.bm-toplist-wrapper {
    --bm-primary:       #ff6b00;
    --bm-primary-dark:  #e05e00;
    --bm-gold:          #f5a623;
    --bm-silver:        #a0a0a0;
    --bm-bronze:        #c97b3b;
    --bm-text:          #1a1a1a;
    --bm-muted:         #666;
    --bm-border:        #e5e7eb;
    --bm-bg-header:     #f9fafb;
    --bm-bg-first:      #fffbf5;
    --bm-radius:        10px;
    --bm-shadow:        0 2px 8px rgba(0,0,0,.08);

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--bm-text);
    max-width: 1000px;
    margin: 0 auto 2rem;
}

/* ── Description ───────────────────────────────────────────── */
.bm-toplist-description {
    margin-bottom: 1.25rem;
    color: var(--bm-muted);
    font-size: .95rem;
    line-height: 1.6;
}

/* ── Table shell (CSS grid) ────────────────────────────────── */
.bm-toplist {
    border: 1px solid var(--bm-border);
    border-radius: var(--bm-radius);
    overflow: hidden;
    box-shadow: var(--bm-shadow);
}

/* ── Rows ──────────────────────────────────────────────────── */
.bm-toplist__row {
    display: grid;
    grid-template-columns: 52px 180px 1fr 110px 140px;
    align-items: center;
    border-bottom: 1px solid var(--bm-border);
    transition: background .15s;
    position: relative;
    background: #ffffff;
}

/* No position column variant */
.bm-toplist__row--no-pos {
    grid-template-columns: 180px 1fr 110px 140px;
}

/* No rating column variant */
.bm-toplist__row--no-rating {
    grid-template-columns: 52px 180px 1fr 140px;
}

.bm-toplist__row:last-child {
    border-bottom: none;
}

.bm-toplist__row--header {
    background: var(--bm-bg-header);
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--bm-muted);
}

.bm-toplist__row--brand:hover {
    background: #fafafa;
}

.bm-toplist__row--first {
    background: var(--bm-bg-first);
}

/* ── Cells ─────────────────────────────────────────────────── */
.bm-toplist__cell {
    padding: .9rem .75rem;
}

/* Position */
.bm-toplist__cell--pos {
    text-align: center;
}

.bm-position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 700;
    font-size: .95rem;
    background: var(--bm-border);
    color: var(--bm-muted);
}

.bm-toplist__row--first .bm-position {
    background: var(--bm-gold);
    color: #fff;
}

.bm-toplist__row:nth-child(3) .bm-position {
    background: var(--bm-silver);
    color: #fff;
}

.bm-toplist__row:nth-child(4) .bm-position {
    background: var(--bm-bronze);
    color: #fff;
}

/* Brand logo cell */
.bm-toplist__cell--brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
}

.bm-brand-logo-wrap {
    display: flex;
    align-items: center;
}

.bm-brand-logo {
    max-width: 180px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.bm-brand-name-text {
    font-weight: 700;
    font-size: 1rem;
}

/* Screen-reader brand name (hidden visually when logo shown) */
.bm-brand-name-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

.bm-review-link {
    font-size: .78rem;
    color: var(--bm-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .2rem;
}

.bm-review-link::after {
    content: "›";
}

.bm-review-link:hover {
    text-decoration: underline;
}

/* Badge */
.bm-badge {
    position: absolute;
    top: .6rem;
    right: .5rem;
    background: var(--bm-primary);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .2em .5em;
    border-radius: 4px;
}

/* USPs */
.bm-usps {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin-bottom: 0px!important;
    padding-left: 0px!important;
}

.bm-usp {
    font-size: .88rem;
    line-height: 1.4;
    padding-left: 1.1rem;
    position: relative;
    color: var(--bm-text);
    list-style-type: none !important;
}

.bm-usp::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
    font-size: .85rem;
}
/* Rating */
.bm-toplist__cell--rating {
    text-align: center;
}

.bm-stars {
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.bm-star {
    font-size: 1.1rem;
}

.bm-star--full  { color: var(--bm-gold); }
.bm-star--half  { color: var(--bm-gold); opacity: .6; }
.bm-star--empty { color: #d1d5db; }

.bm-rating-number {
    font-size: .78rem;
    color: var(--bm-muted);
    margin-left: .25rem;
    font-weight: 600;
}

/* CTA */
.bm-toplist__cell--cta {
    text-align: center;
}

.bm-cta-button {
    display: inline-block;
    padding: .6rem 1.1rem;
    border-radius: 6px;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    background: #e5e7eb;
    color: var(--bm-text);
    transition: background .15s, color .15s, transform .1s;
    white-space: nowrap;
}

.bm-cta-button:hover {
    background: #d1d5db;
    transform: translateY(-1px);
}

.bm-cta-button--primary {
    background: var(--bm-primary);
    color: #fff;
}

.bm-cta-button--primary:hover {
    background: var(--bm-primary-dark);
    color: #fff;
}

/* Disclaimer */
.bm-disclaimer {
    font-size: .75rem;
    color: var(--bm-muted);
    margin-top: .75rem;
    text-align: center;
}

/* Error */
.bm-error {
    color: #dc2626;
    font-size: .9rem;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media ( max-width: 700px ) {

    .bm-toplist__row {
        grid-template-columns: 1fr 1fr;
        gap: 0;
    }

    .bm-toplist__row--header { display: none; }

    .bm-toplist__cell {
        padding: .65rem .75rem;
    }

    /* Show data-label pseudo-headers */
    .bm-toplist__cell[data-label]::before {
        display: block;
        content: attr(data-label);
        font-size: .7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: var(--bm-muted);
        margin-bottom: .2rem;
    }

    .bm-toplist__cell--pos {
        position: absolute;
        top: 5px;
    }

    .bm-toplist__cell--brand {
        grid-column: 1 / -1;
    }

    .bm-toplist__cell--usps {
        grid-column: 1 / -1;
    }

    .bm-toplist__cell--rating {
        grid-column: 1 / 2;
    }

    .bm-toplist__cell--cta {
        grid-column: 2 / 3;
    }

    .bm-cta-button {
        width: 100%;
        text-align: center;
    }
}
