/**
 * LBSK Archery Frontend Styles
 * Material Design inspired - flat, clean, mobile-first
 */

/* Reset and Base */
.lbsk-archers,
.lbsk-archer-detail,
.lbsk-results,
.lbsk-records,
.lbsk-statistics,
.lbsk-dashboard {
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #212121;
    margin: 0;
    padding: 16px;
}

/* Tables */
.lbsk-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.lbsk-table th,
.lbsk-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.lbsk-table th {
    background: #fafafa;
    font-weight: 500;
    color: #616161;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.lbsk-table tbody tr:hover {
    background-color: #f5f5f5;
}

.lbsk-table tbody tr:last-child td {
    border-bottom: none;
}

/* Links */
.lbsk-table a {
    color: #1976d2;
    text-decoration: none;
}

.lbsk-table a:hover {
    text-decoration: underline;
}

/* Badges */
.lbsk-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lbsk-badge-success {
    background-color: #4caf50;
    color: #fff;
}

.lbsk-badge-secondary {
    background-color: #9e9e9e;
    color: #fff;
}

.lbsk-badge-primary {
    background-color: #1976d2;
    color: #fff;
}

/* Rank indicators */
.lbsk-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-weight: 500;
    font-size: 12px;
}

.lbsk-rank-gold {
    background: #ffc107;
    color: #212121;
}

.lbsk-rank-silver {
    background: #bdbdbd;
    color: #212121;
}

.lbsk-rank-bronze {
    background: #8d6e63;
    color: #fff;
}

/* Archer Detail */
.lbsk-archer-back {
    margin-bottom: 16px;
}

.lbsk-back-link {
    display: inline-flex;
    align-items: center;
    color: #1976d2;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 0;
}

.lbsk-back-link:hover {
    text-decoration: underline;
}

.lbsk-archer-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.lbsk-archer-name {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 400;
    color: #212121;
}

.lbsk-archer-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lbsk-archer-club {
    color: #757575;
}

.lbsk-archer-statistics,
.lbsk-archer-results {
    margin-top: 24px;
}

.lbsk-archer-statistics h4,
.lbsk-archer-results h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: #212121;
}

/* Distance badge */
.lbsk-distance {
    color: #757575;
    font-size: 12px;
}

/* Statistics Cards */
.lbsk-stats-header h3 {
    margin: 0 0 16px 0;
    font-size: 20px;
    font-weight: 400;
    color: #212121;
}

.lbsk-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.lbsk-stat-card {
    background: #fff;
    padding: 16px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.lbsk-stat-value {
    font-size: 32px;
    font-weight: 300;
    color: #1976d2;
    line-height: 1;
    margin-bottom: 4px;
}

.lbsk-stat-label {
    font-size: 12px;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lbsk-top-performers,
.lbsk-equipment-distribution {
    margin-top: 24px;
}

.lbsk-top-performers h4,
.lbsk-equipment-distribution h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: #212121;
}

.lbsk-equipment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lbsk-equipment-item {
    background: #f5f5f5;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lbsk-equipment-name {
    font-weight: 500;
}

.lbsk-equipment-count {
    background: #1976d2;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 8px;
}

/* Pagination */
.lbsk-pagination {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.lbsk-pagination-info {
    color: #757575;
    font-size: 13px;
}

/* Error and No Results */
.lbsk-error,
.lbsk-no-results {
    padding: 24px;
    text-align: center;
}

.lbsk-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.lbsk-no-results {
    background-color: #f5f5f5;
    color: #616161;
}

/* ============================================
   DASHBOARD STYLES - Material Design
   ============================================ */

.lbsk-dashboard {
    max-width: 100%;
    margin: 0 auto;
}

/* Section Titles */
.lbsk-section-title {
    font-size: 16px;
    font-weight: 500;
    color: #212121;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

/* Hero Stats Section */
.lbsk-dashboard-hero {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.lbsk-hero-stat {
    background: #fff;
    padding: 20px 16px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-top: 3px solid #1976d2;
}

.lbsk-hero-archers {
    border-top-color: #1976d2;
}

.lbsk-hero-results {
    border-top-color: #4caf50;
}

.lbsk-hero-records {
    border-top-color: #ffc107;
}

.lbsk-hero-icon {
    display: none;
}

.lbsk-hero-value {
    font-size: 36px;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 4px;
    color: #212121;
}

.lbsk-hero-label {
    font-size: 12px;
    font-weight: 500;
    color: #757575;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Top Performers Section - Simple List */
.lbsk-dashboard-podium {
    background: #fff;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid #e0e0e0;
}

.lbsk-performers-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lbsk-performer-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.lbsk-performer-row:last-child {
    border-bottom: none;
}

.lbsk-performer-rank {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #424242;
    margin-right: 16px;
    flex-shrink: 0;
}

.lbsk-performer-rank-1,
.lbsk-performer-rank-2,
.lbsk-performer-rank-3 {
    background: transparent;
}

.lbsk-performer-info {
    flex: 1;
    min-width: 0;
}

.lbsk-performer-name {
    font-weight: 500;
    color: #212121;
    text-decoration: none;
    display: block;
}

.lbsk-performer-name:hover {
    color: #1976d2;
}

.lbsk-performer-stats {
    color: #757575;
    font-size: 13px;
    margin-top: 2px;
}

.lbsk-performer-score {
    font-weight: 500;
    color: #1976d2;
    text-align: right;
    white-space: nowrap;
    margin-left: 16px;
}

/* Equipment Distribution */
.lbsk-dashboard-equipment {
    background: #fff;
    margin-bottom: 24px;
    border: 1px solid #e0e0e0;
}

/* Equipment Toggle Button */
.lbsk-equipment-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #fff !important;
    border: none !important;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.lbsk-equipment-toggle:hover,
.lbsk-equipment-toggle:focus {
    background: #fafafa !important;
    outline: none;
}

.lbsk-equipment-toggle .lbsk-title-icon {
    display: none;
}

.lbsk-equipment-title {
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    flex: 1;
}

.lbsk-equipment-total {
    font-size: 13px;
    color: #757575;
}

.lbsk-equipment-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: #757575;
}

.lbsk-equipment-arrow svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.lbsk-equipment-toggle[aria-expanded="true"] .lbsk-equipment-arrow {
    transform: rotate(180deg);
}

/* Equipment Content (Collapsible) */
.lbsk-equipment-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    border-top: 1px solid #e0e0e0;
}

.lbsk-equipment-bars {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lbsk-equipment-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lbsk-equipment-bar-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lbsk-equipment-bar-name {
    font-weight: 500;
    color: #212121;
    font-size: 13px;
}

.lbsk-equipment-bar-count {
    font-weight: 500;
    color: #757575;
    font-size: 13px;
}

.lbsk-equipment-bar-track {
    height: 4px;
    background: #e0e0e0;
}

.lbsk-equipment-bar-fill {
    height: 100%;
    background-color: #1976d2;
}

/* Quick Links */
.lbsk-dashboard-links {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
}

.lbsk-quick-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fff;
    text-decoration: none;
}

.lbsk-quick-link:hover {
    background: #fafafa;
}

.lbsk-link-icon {
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lbsk-link-icon svg {
    width: 20px;
    height: 20px;
    stroke: #1976d2;
}

.lbsk-link-text {
    flex: 1;
}

.lbsk-link-title {
    font-weight: 500;
    color: #212121;
    font-size: 14px;
}

.lbsk-link-desc {
    font-size: 12px;
    color: #757575;
}

.lbsk-link-arrow {
    color: #bdbdbd;
    font-size: 18px;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .lbsk-archers,
    .lbsk-archer-detail,
    .lbsk-results,
    .lbsk-records,
    .lbsk-statistics,
    .lbsk-dashboard {
        padding: 12px;
        font-size: 14px;
    }

    .lbsk-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .lbsk-table th,
    .lbsk-table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .lbsk-dashboard-hero {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .lbsk-hero-stat {
        padding: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }

    .lbsk-hero-value {
        font-size: 28px;
        order: 2;
    }

    .lbsk-hero-label {
        order: 1;
        font-size: 13px;
    }

    .lbsk-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .lbsk-stat-card {
        padding: 12px;
    }

    .lbsk-stat-value {
        font-size: 24px;
    }

    .lbsk-performer-row {
        padding: 10px 0;
    }

    .lbsk-performer-rank {
        width: 28px;
        height: 28px;
        font-size: 13px;
        margin-right: 12px;
    }

    .lbsk-performer-name {
        font-size: 14px;
    }

    .lbsk-performer-stats {
        font-size: 12px;
    }

    .lbsk-equipment-toggle {
        padding: 14px;
    }

    .lbsk-equipment-bars {
        padding: 14px;
        gap: 10px;
    }

    .lbsk-quick-link {
        padding: 14px;
    }

    .lbsk-link-icon {
        width: 36px;
        height: 36px;
    }

    .lbsk-link-icon svg {
        width: 18px;
        height: 18px;
    }

    .lbsk-archer-name {
        font-size: 20px;
    }

    .lbsk-archer-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Print Styles */
@media print {
    .lbsk-table,
    .lbsk-stat-card,
    .lbsk-dashboard-podium,
    .lbsk-dashboard-equipment {
        border: 1px solid #ccc;
    }

    .lbsk-pagination,
    .lbsk-equipment-toggle,
    .lbsk-link-arrow {
        display: none;
    }
}
