/* --------------------------------------------------
   GLOBAL FONT (Sans Serif)
-------------------------------------------------- */

.poty-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, "Helvetica Neue", Arial, sans-serif;
}


/* =====================================================
   PLAYER OF THE YEAR – FRONTEND STYLES
   ===================================================== */

.poty-wrapper {
    width: 100%;
}


/* =====================================================
   DESKTOP / MOBILE DISPLAY SWITCH
   ===================================================== */

.poty-desktop {
    display: block;
}

.poty-mobile {
    display: none;
}

@media (max-width: 768px) {

    .poty-desktop {
        display: none;
    }

    .poty-mobile {
        display: block;
    }

}


/* =====================================================
   LEADERBOARD TABLE
   ===================================================== */

.poty-frontend-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.poty-frontend-table th,
.poty-frontend-table td {
    border: 1px solid #d6d6d6;
    padding: 6px 6px;
    text-align: center;
    vertical-align: middle;
}


/* ---------- Header Styling ---------- */

.poty-frontend-table thead th {
    background: #05518C;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
}



/* ---------- Alternating Rows ---------- */

.poty-frontend-table tbody tr:nth-child(even) {
    background: #f7f7f7;
}


/* ---------- Hover Highlight ---------- */

.poty-frontend-table tbody tr:hover {
    background: #eef5fb;
}


/* ---------- Rank + Name Columns ---------- */

.poty-frontend-table td:nth-child(2),
.poty-frontend-table td:nth-child(3) {
    text-align: left;
}


/* ---------- TOTAL Column ---------- */

.poty-frontend-table td:last-child {
    font-weight: bold;
}


/* ---------- Vertical Rotated Event Headers ---------- */

.poty-frontend-table thead th:nth-child(n+4):not(:last-child) {

    writing-mode: vertical-rl;
    transform: rotate(180deg);

    white-space: nowrap;
    font-size: 1rem;
    padding: 12px 2px;
    min-width: 38px;
}


/* =====================================================
   WINNER + TIE HIGHLIGHTING
   ===================================================== */

/*
.poty-winner {
    background: #e8f7e8 !important;
    border-left: 4px solid #28a745;
}

.poty-frontend-table tr.poty-tie {
    background: #fff8e5;
}

.poty-player-card.poty-tie {
    border-left: 4px solid #f0b429;
    background: #fff8e5;
}
*/


/* =====================================================
   DIVISION TITLE
   ===================================================== */

.poty-division-title {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #05518C;
    font-weight: 600;
}


/* =====================================================
   MOBILE ACCORDION
   ===================================================== */

.poty-player-card {
    border: 1px solid #ddd;
    margin-bottom: 12px;
    border-radius: 6px;
    overflow: hidden;
}


/* Accordion Header */

.poty-player-toggle {
    width: 100%;
    background: #05518C;
    color: white;
    border: none;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.poty-player-toggle:hover {
    background: #033e6b;
}


/* Accordion Body */

.poty-player-body {
    display: none;
    padding: 14px;
    background: #fafafa;
}


/* Stat Row */

.poty-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.poty-stat-row:last-child {
    border-bottom: none;
}

.poty-frontend-table td:first-child {
    background: #05518C;
    color: white;
    font-weight: bold;
}


/*
.poty-frontend-table td:nth-child(2),
.poty-frontend-table td:nth-child(3) {
    min-width: 120px;
}
*/

/*
.poty-tie-label {
    display: block;
    font-size: 10px;
    font-weight: bold;
    color: #d35400;
    margin-top: 2px;
}

.poty-frontend-table tr.poty-tie td {
    background: #fff3cd;
}

.poty-frontend-table tr.poty-tie {
    border-left: 4px solid #f0b429;
}

.poty-frontend-table tr.poty-tie .poty-tie-label {
    color: #c0392b;
}

.poty-frontend-table tr.poty-tie td:first-child {
    background: #e8d9a8;
    color: #05518C;
    font-weight: bold;
}
*/

/* Column header links */

.poty-frontend-table thead th a {
    color: #ffffff;
    text-decoration: none;
}

.poty-frontend-table thead th a:hover {
    text-decoration: underline;
}

.poty-save-column-link.saved {
    background: #28a745;
    color: white;
}

.poty-save-column-link.saved {
    background:#28a745;
    color:white;
}

/* Prevent header links from changing typography */

.poty-frontend-table thead th a {
    color: #ffffff;
    text-decoration: none;
    text-align: left;

    font-size: 1rem !important;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;

    display: inline-block;
    height: 100%;
    width: 100%;
}

.poty-frontend-table thead th a:hover {
    text-decoration: underline;
}

.poty-mobile .poty-stat-row a {
    font-size: inherit;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.poty-mobile .poty-stat-row a:hover {
    text-decoration: underline;
}

.poty-mobile .poty-stat-row a::after {
    content: " ↗";
    font-size: 0.8em;
}

/* ====================================
   EDIT BOARD BUTTON
==================================== */

.poty-edit-board {
    margin-bottom: 12px;
    position: relative;
    top: -10px;
}

.poty-edit-button {
    display: inline-block;
    background: #05518C;
    color: #fff;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
}

.poty-edit-button:hover {
    background: #033b66;
    color: #fff;
}

#poty-floating-save {
    position: fixed !important;
    top: 120px;
    right: 30px;
    z-index: 999999;

    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 12px 14px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

#poty-floating-save button {
    display:block;
    width:100%;
}

#poty-floating-save .poty-save-status {
    font-size:11px;
    margin-top:6px;
    color:#666;
}

#poty-column-sort {
    list-style:none;
    margin:0;
    padding:0;
}

.poty-column-item {
    margin-bottom:12px;
}

.poty-column-card {
    background:#fff;
    border:1px solid #ccd0d4;
    padding:12px;
    position:relative;
}

.poty-column-header {
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:8px;
    font-weight:600;
}

.poty-drag-handle {
    cursor:grab;
    color:#888;
}

.poty-column-body {
    display:flex;
    gap:6px;
}

.poty-column-body input {
    flex:1;
}

.poty-delete-column {
    position:absolute;
    top:8px;
    right:10px;
    color:#a00;
    text-decoration:none;
}

.poty-column-placeholder {
    border:2px dashed #2271b1;
    height:60px;
    margin-bottom:12px;
}

.poty-drag-handle{
    cursor:move;
    margin-right:8px;
    color:#777;
}

.poty-save-all-wrap{
    margin:15px 0;
}

.poty-save-status{
    margin-left:10px;
    font-weight:600;
    color:#2271b1;
}

.poty-save-all-wrap{
    position:sticky;
    top:10px;
    background:#fff;
    padding:8px;
    border-bottom:1px solid #ddd;
    z-index:99;
}

#poty-column-sort li {
    border-bottom: 1px solid #ddd;
    padding: 14px 0;
    margin-bottom: 10px;
}

/* ---------- Column Editor Row Styling ---------- */

#poty-column-sort li {

    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;

    padding: 14px 16px;
    margin-bottom: 14px;

    box-shadow: 0 1px 2px rgba(0,0,0,0.04);

    position: relative;
    transition: all .2s ease;
}

/* Hover lift effect */
#poty-column-sort li:hover {
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

/* Label spacing */
#poty-column-sort li strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}
