/* ==========================================================================
   Cricketers Widget — Exact SportMonks-style replica
   ========================================================================== */

.ls-cricketers-wrap {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 780px;
    margin: 0 auto;
    color: #1a1a2e;
    background: #f5f5f5;
    padding: 24px;
    border-radius: 8px;
}

/* ── Title ────────────────────────────────────────────────────────────────── */
.ls-cricketers-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #1a1a2e;
}

/* ── Tab Row 1: Active + A-Z ─────────────────────────────────────────────── */
.ls-cricketers-tabs-row {
    display: flex;
    align-items: baseline;
    gap: 0;
    border-bottom: 1px solid #ddd;
    margin-bottom: 12px;
}

.ls-cricketers-main-tabs {
    flex-shrink: 0;
    margin-right: 20px;
}

.ls-cricketers-main-tabs .ls-tab-btn {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    cursor: pointer;
    border-bottom: 2px solid #1a1a2e;
    margin-bottom: -1px;
}

.ls-cricketers-letters {
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0;
}

.ls-letter-btn {
    background: none;
    border: none;
    padding: 8px 5px;
    font-size: 13px;
    font-weight: 400;
    color: #666;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s;
    white-space: nowrap;
}

.ls-letter-btn:hover {
    color: #1a1a2e;
}

/* ── Row 2: Format Filter Pills ──────────────────────────────────────────── */
.ls-cricketers-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.ls-filter-pill {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.ls-filter-pill:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.ls-filter-pill.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* ── Player Grid ─────────────────────────────────────────────────────────── */
.ls-cricketers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.ls-cricketer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px dashed #d1d5db;
    margin: -0.5px;
    transition: background 0.15s;
    border-radius: 0;
}

a.ls-cricketer-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    cursor: pointer;
}

.ls-cricketer-card:hover {
    background: #fff;
}

/* ── Photo ────────────────────────────────────────────────────────────────── */
.ls-cricketer-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
}

.ls-cricketer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ls-cricketer-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 18px;
    font-weight: 600;
}

/* ── Info ─────────────────────────────────────────────────────────────────── */
.ls-cricketer-info {
    min-width: 0;
}

.ls-cricketer-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ls-cricketer-fullname {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ls-cricketer-age {
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
    line-height: 1.3;
    margin-top: 1px;
}

/* ── Empty State ──────────────────────────────────────────────────────────── */
.ls-cricketers-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .ls-cricketers-grid {
        grid-template-columns: 1fr;
    }

    .ls-cricketers-tabs-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .ls-cricketers-letters {
        flex-wrap: wrap;
    }

    .ls-letter-btn {
        padding: 6px 5px;
        font-size: 12px;
    }
}

/* ── Hidden by JS filter ──────────────────────────────────────────────────── */
.ls-cricketer-card.ls-hidden {
    display: none;
}

/* ==========================================================================
   Single Cricketer Page
   ========================================================================== */

.ls-cricketer-single {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 960px;
    margin: 0 auto;
    padding-bottom: 40px;
    color: #222;
    line-height: 1.55;
}

/* ── Two Column Layout ─────────────────────────────────────────────────────── */
.ls-cs-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    align-items: start;
}

/* ── Sidebar Profile Card ──────────────────────────────────────────────────── */
.ls-cs-sidebar {
    position: sticky;
    top: 20px;
}

.ls-cs-profile-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.ls-cs-pc-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ls-cs-pc-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.ls-cs-pc-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1) 0%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.85) 100%
    );
}

.ls-cs-pc-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.ls-cs-pc-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.ls-cs-pc-role {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 14px 0;
}

.ls-cs-pc-actions {
    display: flex;
    gap: 8px;
}

.ls-cs-pc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    backdrop-filter: blur(4px);
}

.ls-cs-pc-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.ls-cs-pc-career {
    position: relative;
    z-index: 2;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
}

.ls-cs-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e4e6ea;
    margin-bottom: 24px;
    overflow-x: auto;
}

.ls-cs-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #667781;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.ls-cs-tab:hover { color: #333; }

.ls-cs-tab.active {
    color: #0273cc;
    border-bottom-color: #0273cc;
    font-weight: 600;
}

.ls-cs-panel { display: none; }
.ls-cs-panel.active { display: block; }

.ls-cs-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
    margin-bottom: 28px;
}

.ls-cs-info-row {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ls-cs-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.ls-cs-value {
    font-size: 14px;
    font-weight: 500;
    color: #222;
}

.ls-cs-section { margin-bottom: 28px; }

.ls-cs-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.ls-cs-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 16px 0 8px 0;
}

.ls-cs-teams-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ls-cs-team-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    font-size: 13px;
}

.ls-cs-team-flag {
    width: 22px;
    height: 16px;
    background: #ddd;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #666;
}

.ls-cs-team-name { font-weight: 500; color: #333; }

.ls-cs-bio p {
    font-size: 14px;
    line-height: 1.65;
    color: #444;
    margin: 0;
}

.ls-cs-table-wrap { overflow-x: auto; margin-bottom: 8px; }

.ls-cs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}

.ls-cs-table thead th {
    background: #f5f6f6;
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: #555;
    border-bottom: 2px solid #e4e6ea;
}

.ls-cs-table tbody td {
    padding: 8px 10px;
    text-align: center;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.ls-cs-table tbody tr:hover { background: #fafbfc; }

.ls-cs-table .ls-cs-format {
    font-weight: 600;
    color: #222;
    text-align: left;
    padding-left: 12px;
}

.ls-cs-coming-soon {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 14px;
}

.ls-cs-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ls-cs-photo-item {
    width: 200px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.ls-cs-photo-item img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .ls-cs-layout {
        grid-template-columns: 1fr;
    }

    .ls-cs-sidebar {
        position: static;
    }

    .ls-cs-profile-card {
        height: 320px;
    }
}

@media (max-width: 640px) {
    .ls-cs-info-grid { grid-template-columns: 1fr; gap: 0; }
    .ls-cs-tabs { gap: 0; }
    .ls-cs-tab { padding: 10px 12px; font-size: 13px; }
}

/* ==========================================================================
   Top Cricketers Widget
   ========================================================================== */

.ls-top-cricketers {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 320px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

.ls-top-cricketers-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px 0;
    padding-left: 12px;
    border-left: 3px solid #2563eb;
}

.ls-top-cricketers-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ls-top-cricketer-item {
    border-bottom: 1px dashed #e5e7eb;
}

.ls-top-cricketer-item:last-child {
    border-bottom: none;
}

.ls-top-cricketer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}

.ls-top-cricketer-link:hover {
    background: #f9fafb;
}

.ls-top-cricketer-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #e5e7eb;
}

.ls-top-cricketer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ls-top-cricketer-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 600;
}

.ls-top-cricketer-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.3;
}

.ls-top-cricketers-empty {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 13px;
}
