﻿/* =========================================================
   PLAYER PAGES - GENERAL LAYOUT
========================================================= */

.player-page,
.player-form-page,
.player-details-page {
    padding: 24px;
}

.player-header-card,
.player-toolbar-card,
.player-table-card,
.player-form-card,
.player-stat-card,
.player-detail-card,
.player-details-hero {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}


/* =========================================================
   ALERTS
========================================================= */

.player-alert {
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 14px;
    font-weight: 600;
    border: 1px solid transparent;
}

.player-alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.player-alert-danger,
.player-delete-alert {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}


/* =========================================================
   HEADER / HERO
========================================================= */

.player-header-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 28px;
    margin-bottom: 20px;
    color: white;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
}

.player-page-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.85;
}

.player-page-title,
.player-form-header h1,
.player-details-hero h1 {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 800;
}

.player-page-subtitle,
.player-form-header p {
    margin: 0;
    font-size: 15px;
    color: #dbeafe;
}

.player-header-actions,
.player-toolbar-actions,
.player-form-actions,
.player-action-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


/* =========================================================
   BUTTONS
========================================================= */

.player-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s ease;
}

.player-btn-primary {
    background: #2563eb;
    color: white;
}

    .player-btn-primary:hover {
        background: #1d4ed8;
        color: white;
    }

.player-btn-light {
    background: #eef2ff;
    color: #1e3a8a;
}

    .player-btn-light:hover {
        background: #e0e7ff;
        color: #1e3a8a;
    }

.player-btn-danger {
    background: #dc2626;
    color: white;
}

    .player-btn-danger:hover {
        background: #b91c1c;
        color: white;
    }

.player-btn-done {
    background: limegreen;
    color: white;
    box-shadow: 0 6px 14px rgba(50, 205, 50, 0.4);
}

    .player-btn-done:hover {
        background: #22c55e;
        color: white;
        transform: translateY(-1px);
    }


/* =========================================================
   STATS CARDS
========================================================= */

.player-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.player-stat-card {
    padding: 20px;
}

.player-stat-label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: #6b7280;
}

.player-stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
}


/* =========================================================
   SEARCH TOOLBAR
========================================================= */

.player-toolbar-card {
    padding: 24px;
    margin-bottom: 20px;
}

.player-search-form {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.player-search-group {
    flex: 1;
    min-width: 260px;
}

    .player-search-group label,
    .player-form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 700;
        color: #374151;
    }

.player-search-input,
.player-form-input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #f9fafb;
    font-size: 15px;
    transition: 0.2s ease;
}

    .player-search-input:focus,
    .player-form-input:focus {
        outline: none;
        background: white;
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    }


/* =========================================================
   PLAYERS TABLE
========================================================= */

.player-table-card {
    padding: 24px;
}

.player-table-responsive {
    width: 100%;
    overflow-x: auto;
}

.player-table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
}

    .player-table thead th {
        padding: 14px 16px;
        text-align: left;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: #6b7280;
        background: #f8fafc;
        border-bottom: 1px solid #e5e7eb;
    }

    .player-table tbody td {
        padding: 18px 16px;
        vertical-align: middle;
        border-bottom: 1px solid #eef2f7;
    }

    .player-table tbody tr:hover {
        background: #f8fbff;
    }


/* =========================================================
   PLAYER TABLE CONTENT
========================================================= */

.player-name-cell {
    display: flex;
    align-items: center;
    gap: 14px;
}

.player-avatar,
.player-details-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #2563eb, #0f172a);
}

.player-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
}

.player-details-avatar {
    width: 74px;
    height: 74px;
    font-size: 28px;
    flex-shrink: 0;
}

.player-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.player-meta {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

.player-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.player-badge-draft {
    background: #dbeafe;
    color: #1d4ed8;
}

.player-points {
    font-size: 18px;
    font-weight: 800;
    color: #059669;
}


/* =========================================================
   TABLE ACTION LINKS
========================================================= */

.player-link {
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

    .player-link:hover {
        text-decoration: underline;
    }

.player-link-danger {
    color: #dc2626;
}


/* =========================================================
   EMPTY STATE
========================================================= */

.player-empty-state {
    text-align: center;
    padding: 40px 20px;
}

    .player-empty-state h3 {
        margin-bottom: 8px;
        color: #111827;
    }

    .player-empty-state p {
        margin-bottom: 20px;
        color: #6b7280;
    }


/* =========================================================
   CREATE / EDIT FORM PAGES
========================================================= */

.player-form-card {
    max-width: 760px;
    margin: 0 auto;
    padding: 24px;
}

.player-form-header {
    margin-bottom: 24px;
}

    .player-form-header p {
        color: #6b7280;
    }

.player-form-grid {
    display: grid;
    gap: 18px;
}


/* =========================================================
   DETAILS / DELETE PAGES
========================================================= */

.player-details-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    margin-bottom: 20px;
}

    .player-details-hero .player-page-subtitle {
        color: #6b7280;
    }

.player-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.player-detail-card {
    padding: 24px;
}

    .player-detail-card h3 {
        margin-top: 0;
        margin-bottom: 18px;
        font-size: 18px;
        color: #111827;
    }

.player-detail-list {
    display: grid;
    gap: 14px;
}

    .player-detail-list div {
        display: flex;
        justify-content: space-between;
        gap: 16px;
        padding: 12px 0;
        border-bottom: 1px solid #eef2f7;
    }

    .player-detail-list span {
        color: #6b7280;
    }

    .player-detail-list strong {
        color: #111827;
        text-align: right;
    }

.player-delete-card {
    border-color: #fecaca;
}

.player-delete-alert {
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: 14px;
    font-weight: 600;
    border-width: 1px;
    border-style: solid;
}


/* =========================================================
   HELPERS
========================================================= */

.text-end {
    text-align: right;
}

.text-danger {
    color: #dc2626;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {
    .player-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .player-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .player-page,
    .player-form-page,
    .player-details-page {
        padding: 14px;
    }

    .player-header-card,
    .player-details-hero {
        flex-direction: column;
        align-items: flex-start;
    }

        .player-page-title,
        .player-form-header h1,
        .player-details-hero h1 {
            font-size: 26px;
        }

    .player-stats-grid {
        grid-template-columns: 1fr;
    }

    .player-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .player-header-actions,
    .player-toolbar-actions,
    .player-form-actions {
        width: 100%;
    }

    .player-btn {
        width: 100%;
    }
}
