/* Lion Bet Analyst - Melhorias visuais (carregar DEPOIS do style.css) */

:root {
    --lb-ink: #1f2a24;
    --lb-muted: #6b7a72;
    --lb-line: #e6ebe8;
    --lb-soft: #f3f6f4;
    --lb-card: #ffffff;
    --lb-wa: #25d366;
    --lb-tg: #229ed9;
}

/* ---------- Header: botoes com o mesmo tamanho e alinhamento ---------- */
header .header-content {
    gap: 12px;
    flex-wrap: wrap;
}
header .header-actions { align-items: center; flex-wrap: wrap; }
header .header-actions > div { margin-right: 0 !important; gap: 10px !important; }
header .header-content button,
header .header-content a.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
}
header .header-content button:hover {
    transform: none;
    filter: brightness(1.06);
}
header .last-update {
    font-size: 12px;
    opacity: .7;
    white-space: nowrap;
}

/* ---------- Grade de cards ---------- */
.events-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.lb-card {
    background: var(--lb-card);
    border: 1px solid var(--lb-line);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, border-color .2s;
}
.lb-card:hover { box-shadow: 0 6px 18px rgba(26, 71, 42, .10); }
.lb-card.is-fav { border-color: var(--accent); }
.lb-card.in-slip { border-color: var(--secondary); box-shadow: 0 0 0 2px rgba(46, 139, 87, .25); }

.lb-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
}
.lb-when { font-weight: 700; white-space: nowrap; cursor: help; }
.lb-when.today { color: var(--accent); }
.lb-when.tomorrow { color: #9be7b9; }
.lb-league {
    opacity: .85;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.lb-card__body { padding: 12px 14px 10px; flex: 1; }

.lb-match {
    font-size: 15px;
    font-weight: 700;
    color: var(--lb-ink);
    line-height: 1.3;
    margin-bottom: 10px;
}

.lb-pick {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    background: var(--lb-soft);
    border-radius: 8px;
    margin-bottom: 10px;
}
.lb-pick__text { display: flex; flex-direction: column; min-width: 0; }
.lb-selection {
    font-weight: 600;
    color: var(--lb-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.lb-market { font-size: 12px; color: var(--lb-muted); }
.lb-odds {
    font-size: 20px;
    font-weight: 800;
    color: var(--secondary);
    font-variant-numeric: tabular-nums;
}

.lb-conf { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lb-bar {
    flex: 1;
    height: 6px;
    background: var(--lb-line);
    border-radius: 999px;
    overflow: hidden;
}
.lb-bar span { display: block; height: 100%; border-radius: 999px; }
.lb-pct { font-size: 14px; font-weight: 800; min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.lv-top  .lb-bar span { background: #1e9e55; } .lv-top  .lb-pct { color: #1e9e55; }
.lv-high .lb-bar span { background: #3fb36e; } .lv-high .lb-pct { color: #2e8b57; }
.lv-mid  .lb-bar span { background: #e0a91b; } .lv-mid  .lb-pct { color: #b7860c; }
.lv-low  .lb-bar span { background: #a9b5ae; } .lv-low  .lb-pct { color: var(--lb-muted); }

.lb-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--lb-muted);
}
.lb-chip {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--lb-soft);
    border: 1px solid var(--lb-line);
}

.lb-card__actions {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid var(--lb-line);
    background: #fafcfb;
}

.lb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 34px;
    padding: 0 12px;
    border-radius: 8px;
    border: 1px solid var(--lb-line);
    background: #fff;
    color: var(--lb-ink);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}
.lb-btn:hover { border-color: var(--secondary); color: var(--primary); }
.lb-btn:disabled { opacity: .6; cursor: wait; }
.lb-btn--share { flex: 1; background: var(--secondary); border-color: var(--secondary); color: #fff; }
.lb-btn--share:hover { background: var(--primary); color: #fff; }
.lb-btn--slip[aria-pressed="true"] { background: #e8f5ee; border-color: var(--secondary); color: var(--primary); }
.lb-btn--fav { width: 38px; padding: 0; font-size: 18px; color: #c9a40a; }
.lb-btn--fav[aria-pressed="true"] { background: #fff8db; border-color: var(--accent); }
.lb-btn--primary { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.lb-btn--primary:hover { background: var(--primary); color: #fff; }

/* ---------- Barra da multipla ---------- */
.lb-slipbar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translate(-50%, 140%);
    width: min(640px, calc(100% - 24px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 10px 16px;
    background: var(--primary);
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    z-index: 900;
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
}
.lb-slipbar.show { transform: translate(-50%, 0); visibility: visible; transition: transform .25s ease; }
.lb-slipbar__info { display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; }
.lb-slipbar__info b { color: var(--accent); font-size: 15px; }
.lb-slipbar__actions { display: flex; gap: 8px; }
.lb-slipbar .lb-btn:not(.lb-btn--primary) { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.lb-slipbar .lb-btn--primary { background: var(--accent); border-color: var(--accent); color: var(--lb-ink); }
body.lb-has-slip .events-container { padding-bottom: 90px; }

/* ---------- Modal de compartilhamento ---------- */
.lb-modal { position: fixed; inset: 0; z-index: 1100; display: none; }
.lb-modal.show { display: block; }
.lb-modal__backdrop { position: absolute; inset: 0; background: rgba(15, 30, 20, .55); }
.lb-modal__panel {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(480px, calc(100% - 24px));
    max-height: calc(100vh - 24px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}
.lb-modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.lb-modal__head h3 { font-size: 17px; color: var(--primary); }
.lb-modal__x { border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--lb-muted); padding: 4px 8px; }
.lb-modal__hint { font-size: 12px; color: var(--lb-muted); margin-bottom: 10px; }
.lb-modal__text {
    width: 100%;
    font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    padding: 10px;
    border: 1px solid var(--lb-line);
    border-radius: 8px;
    background: var(--lb-soft);
    color: var(--lb-ink);
    resize: vertical;
}
.lb-modal__channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.lb-ch {
    height: 42px;
    border: 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
}
.lb-ch:hover { filter: brightness(1.07); }
.lb-ch--wa { background: var(--lb-wa); }
.lb-ch--tg { background: var(--lb-tg); }
.lb-ch--copy, .lb-ch--native { background: var(--lb-soft); color: var(--lb-ink); border: 1px solid var(--lb-line); }
body.lb-modal-open { overflow: hidden; }

/* ---------- Filtros em gaveta no celular ---------- */
.lb-filters-toggle, .lb-filters-backdrop { display: none; }

@media (max-width: 768px) {
    .lb-filters-toggle {
        display: inline-flex;
        position: fixed;
        right: 14px;
        bottom: 16px;
        z-index: 950;
        height: 44px;
        padding: 0 18px;
        align-items: center;
        border: 0;
        border-radius: 999px;
        background: var(--accent);
        color: var(--lb-ink);
        font-weight: 700;
        box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
    }
    body.lb-has-slip .lb-filters-toggle { bottom: 140px; }
    body.lb-has-slip .events-container { padding-bottom: 150px; }

    header .header-actions { flex-wrap: wrap; justify-content: center; }

    .filters-sidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100% !important;
        width: min(330px, 88vw) !important;
        max-height: none !important;
        border-radius: 0 !important;
        z-index: 1001;
        transform: translateX(-105%);
        transition: transform .25s ease;
        overflow: hidden;
    }
    body.lb-filters-open .filters-sidebar { transform: translateX(0); }
    body.lb-filters-open .filters-content { overflow-y: auto !important; }

    body.lb-filters-open .lb-filters-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 30, 20, .5);
        z-index: 1000;
    }

    .lb-modal__panel {
        top: auto;
        bottom: 0;
        transform: translateX(-50%);
        width: 100%;
        border-radius: 16px 16px 0 0;
    }
    .lb-slipbar { flex-direction: column; align-items: stretch; }
    .lb-slipbar__actions .lb-btn { flex: 1; }
}
