/**
 * lb-widget.css — стилі для LandBankWidget
 * Використовується на дашборді та на сторінці карти.
 * Не залежить від dashboard-material3.css.
 */

/* ══ Summary pills ══ */
.lb-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.lb-pill {
    flex: 1;
    min-width: 90px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(0,0,0,0.07);
    border-radius: 12px;
    padding: 10px 12px;
}

.lb-pill-val {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.lb-pill-val span {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.65;
    margin-left: 1px;
}

.lb-pill-lbl {
    font-size: 10px;
    color: #6b7280;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lb-pill-total .lb-pill-val { color: #7c3aed; }
.lb-pill-free  .lb-pill-val { color: #16a34a; }
.lb-pill-opp   .lb-pill-val { color: #ea580c; }
.lb-pill-unknown .lb-pill-val { color: #6b7280; }

/* ══ Tabs wrapper ══ */
.lb-tabs-wrap {
    background: rgba(0,0,0,0.04);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 10px;
}

/* ── Примітка: договори без дати ── */
.lb-nodate-note {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 10px;
}

/* ── Легенда та підказки вкладок ── */
.lb-yr-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.lb-yr-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.lb-yr-total {
    margin-left: auto;
    font-weight: 700;
    color: #ea580c;
    font-size: 11px;
}

.lb-tab-hint {
    font-size: 11px;
    color: #6b7280;
    background: rgba(0,0,0,0.03);
    border-radius: 7px;
    padding: 8px 10px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lb-hint-opp  { background: rgba(249,115,22,0.06);  color: #9a3412; }
.lb-hint-risk { background: rgba(239,68,68,0.06);   color: #991b1b; }

.lb-hint-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.lb-hint-green { background: rgba(22,163,74,0.12); color: #15803d; }

/* ── Numbered index in rows ── */
.lb-list-idx {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 600;
    min-width: 18px;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* ── Container ── */
.lb-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    margin-top: 6px;
}

.lb-no-data {
    font-size: 13px;
    color: #9ca3af;
    font-style: italic;
    padding: 20px 0;
    text-align: center;
}

/* ── Tabs ── */
.lb-tabs {
    display: flex;
    gap: 3px;
}

.lb-tab {
    flex: 1;
    padding: 7px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    border-radius: 7px;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.lb-tab:hover {
    background: rgba(255,255,255,0.6);
    color: #374151;
}

.lb-tab-active {
    background: #fff;
    color: #1a3c1a;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.lb-tab-cnt {
    display: inline-block;
    min-width: 18px;
    padding: 1px 5px;
    border-radius: 9px;
    background: rgba(0,0,0,0.07);
    font-size: 10px;
    font-weight: 700;
    text-align: center;
}

.lb-tab-active .lb-tab-cnt {
    background: rgba(25, 135, 84, 0.15);
    color: #166534;
}

/* ── Tab panes ── */
.lb-tab-pane {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.lb-pane-hidden {
    display: none !important;
}

/* ── List rows ── */
.lb-list-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px 7px 12px;
    border-radius: 6px;
    border-left: 3px solid transparent;
    background: rgba(0,0,0,0.02);
    transition: background 0.12s;
}

.lb-list-row:hover {
    background: rgba(0,0,0,0.05);
}

.lb-list-row-free              { border-left-color: #4caf50; }
.lb-list-row-free.lb-list-row-new {
    border-left-color: #16a34a;
    background: rgba(22,163,74,0.07);
}
.lb-list-row-opp  { border-left-color: #ff9800; }
.lb-list-row-risk { border-left-color: #ef5350; }

.lb-row-clickable { cursor: pointer; }

.lb-new-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 8px;
    background: #dcfce7;
    color: #15803d;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.lb-reg-date {
    color: #16a34a;
    font-weight: 500;
}

/* ── Row body (left side) ── */
.lb-list-body {
    flex: 1;
    min-width: 0;
}

.lb-list-owner {
    font-size: 12px;
    font-weight: 500;
    color: #1a3c1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-list-meta {
    font-size: 10px;
    color: #9ca3af;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-list-comp       { color: #14532d; font-style: italic; }
.lb-list-comp-own   { color: #7f1d1d; }

/* ── Row right side ── */
.lb-list-right {
    text-align: right;
    flex-shrink: 0;
}

.lb-list-area {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    font-variant-numeric: tabular-nums;
}

.lb-list-date {
    font-size: 10px;
    font-weight: 500;
    margin-top: 1px;
}

/* ── Empty / show-more ── */
.lb-list-empty {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 18px 0;
}

.lb-list-show-more {
    display: block;
    width: 100%;
    padding: 6px;
    border: 1px dashed rgba(0,0,0,0.12);
    background: none;
    border-radius: 6px;
    font-size: 11px;
    color: #6b7280;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.12s;
}

.lb-list-show-more:hover {
    background: rgba(0,0,0,0.04);
    color: #374151;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .lb-pills { gap: 6px; }
    .lb-pill { min-width: 70px; padding: 8px 10px; }
    .lb-pill-val { font-size: 15px; }

    .lb-list-owner { font-size: 11px; }

    .lb-tab { padding: 5px 6px; font-size: 10px; }
    .lb-tab-cnt { display: none; }
}

/* ══ Compact dashboard infographic cards (головний дашборд) ══ */
.lb-dash-cards {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.lb-dash-card {
    flex: 1;
    min-width: 0;
    border-radius: 10px;
    padding: 10px 12px;
    border-left: 3px solid transparent;
}

.lb-dash-card-free { border-left-color: #16a34a; background: rgba(22,163,74,0.06); }
.lb-dash-card-opp  { border-left-color: #ea580c; background: rgba(234,88,12,0.06); }
.lb-dash-card-risk { border-left-color: #ef4444; background: rgba(239,68,68,0.06); }

.lb-dash-card-title {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    opacity: 0.6;
    margin-bottom: 5px;
}

.lb-dash-card-num {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.lb-dash-card-free .lb-dash-card-num { color: #16a34a; }
.lb-dash-card-opp  .lb-dash-card-num { color: #ea580c; }
.lb-dash-card-risk .lb-dash-card-num { color: #ef4444; }

.lb-dash-card-unit {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.55;
    margin-left: 2px;
}

.lb-dash-card-sub {
    font-size: 10px;
    color: #6b7280;
    margin-top: 5px;
    line-height: 1.6;
}

.lb-dash-card-sub b {
    color: #374151;
    font-weight: 600;
}

.lb-dash-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.07);
    transition: background 0.12s, color 0.12s;
    margin-top: 2px;
}

.lb-dash-more:hover {
    background: rgba(0,0,0,0.07);
    color: #1a3c1a;
}

@media (max-width: 768px) {
    .lb-dash-cards { gap: 5px; }
    .lb-dash-card  { padding: 8px 9px; }
    .lb-dash-card-num { font-size: 20px; }
    .lb-dash-card-title { font-size: 8px; }
    .lb-dash-card-sub { font-size: 9px; }
}
