/* list_games.css */

/* Scroll container */
#scoretable-container {
    margin: 0 auto;
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#scoretable-container::-webkit-scrollbar {
    height: 0.375rem; /* 6px → 0.375rem */
}

/* Score table */
table#scoreTable {
    margin: 0;
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    border-radius: 0.75rem; /* 12px */
    border: 0;
}

table input {
    pointer-events: none;
    border: none;
}

/* Table header */
table thead {
    background-color: #202020;
    color: white;
    font-weight: bold;
    font-size: 1rem; /* 12pt → 16px → 1rem */
}

thead th {
    position: sticky;
    top: 0px;
    z-index: 0;
}

/* Cells */
#scoretable-container th,
#scoretable-container td {
    padding: 0.375rem; /* 6px */
    white-space: nowrap;
    min-width: 3.5rem; /* 56px → 3.5rem */
}

#scoretable-container td {
    border: 0.0625rem solid black; /* 1px */
}

#scoretable-container th {
    border-radius: 0.75rem; /* 12px → 0.75rem */
}

th {
    background-color: #202020;
    color: white;
}

/* Table body cells */
td {
    font-style: italic;
    font-size: 0.666rem; /* 8pt → 10.66px → 0.666rem */
    font-weight: bold;
    color: darkgreen;
    text-align: center;
    vertical-align: middle;
}

tr:nth-child(even) {
    background: rgba(255,255,255,0.6);
}

tr:nth-child(odd) {
    background: rgba(180,180,180,0.6);
}

.name {
    color: white;
    width: 100%;
}

.total {
    text-align: center;
    font-style: italic;
    font-weight: bold;
    font-size: 1.166rem; /* 14pt → 18.66px → 1.166rem */
    color: white;
    width: 100%;
}

.place {
    float: right;
    font-size: 0.833rem; /* 10pt → 13.33px → 0.833rem */
}

#scoretable, #scores {
    text-align: center;
}

.transparent {
    background: transparent;
    border: none;
    color: black;
    font-size: 1.166rem; /* 14pt */
    font-weight: bold;
    width: 50%;
    text-align: center;
}

/* ---- Begin Game list table ----- */
table.game-list {
    border-collapse: collapse;
    width: 100%;
    max-width: 37.5rem; /* 600px → 37.5rem */
    margin: 0 auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    border-radius: 0.5rem; /* ensure curves apply around table */
    overflow: hidden;       /* keeps row hover from sticking out */
}
table.game-list tr.game-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}
table.game-list tr.game-row:hover {
    background-color: #f0f8ff; /* light highlight */
}
/* Round corners of the game list table */
table.game-list tr:last-child td:first-child {
    border-bottom-left-radius: 0.5rem;
}
table.game-list tr:last-child td:last-child {
    border-bottom-right-radius: 0.5rem;
}
/* End rounding */
table.game-list th {
    background: #202020;
    font-weight: bold;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
table.game-list th, 
table.game-list td {
    padding: 0.5rem 0.75rem; /* 8px 12px */
    border-bottom: 0.0625rem solid #ccc; /* 1px */
}
table.game-list td {
	color: black;
    font-size: 0.833rem; /* 10pt */
}
table.game-list td.game-host {
    font-weight: 600;
}
table.game-list td.game-id {
    width: 3.125rem; /* 50px */
    text-align: center;
}
table.game-list td.game-status {
    width: 7.5rem; /* 120px */
    text-align: center;
    white-space: nowrap;
}
table.game-list td.updated-time {
    white-space: nowrap;
}
.game-list-title {
    font-size: .95rem;
    margin-bottom: 0.75rem;
    color: white;
    font-style: italic;
}
/* Game badge (ID) */
.game-badge {
    display: inline-block;
    min-width: 2rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px; /* pill shape */
    background-color: #202020;
    color: #fff;
    font-size: 0.75rem;
    font-weight: bold;
    text-align: center;
}
/* Status pill */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
/* Completed = green pill */
.status-completed {
    background-color: #dcfce7; /* light green */
    color: #166534;           /* dark green text */
}
/* In Progress = orange pill */
.status-in-progress {
    background-color: #fef3c7; /* light amber */
    color: #92400e;            /* dark amber text */
}
.status-icon {
    font-size: 0.85rem;
    line-height: 1;
}

/* ----- Begin Individual Scorecards ----- */
.game-header {
    display: flex;
    flex-direction: column;   /* stack children vertically */
    align-items: flex-start;  /* left-align them */
    gap: 0.3rem;              /* small spacing between back link and pill */

    margin: 0.75rem 0 0.5rem 0;  /* closer to table, still breathing room */
    text-align: center;
}
/* Base style for the header pill */
.game-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.45rem 1.2rem;        /* ↑ bigger pill height + width */
    border-radius: 999px;
    font-size: 1rem;               /* larger text */
    font-weight: 600;
    line-height: 1.25;             /* pill height */
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);   /* ← soft shadow */
}
/* Completed = green pill */
.game-updated.completed {
    background-color: #bbf7d0; /* light green */
    color: #166534;            /* dark green */
}
/* In progress = amber pill */
.game-updated.in-progress {
    background-color: #fde68a; /* light amber */
    color: #92400e;            /* dark amber */
}
/* Icon */
.game-updated .status-icon {
    font-size: 1.15rem;
    line-height: 1;
}
/* The "X ago" part can be slightly lighter */
.game-updated-ago {
    font-weight: 500;
	opacity: 0.9;
}

#scores tr:first-child td {
	border-top: 0;
}
#scores tr:last-child td {
	border-bottom: 0;
}
#scores td:first-child {
	border-left: 0;
}
#scores td:last-child {
	border-right: 0;
}
#scores tr:first-child td:first-child {
    border-top-left-radius: 12px;
    border-top: none;
    border-left: none;
}
/* top-right body cell */
#scores tr:first-child td:last-child {
    border-top-right-radius: 12px;
    border-top: none;
    border-right: none;
}
/* bottom-left body cell */
#scores tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
    border-bottom: none;
    border-left: none;
}
/* bottom-right body cell */
#scores tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
    border-bottom: none;
    border-right: none;
}

.back-to-list {
    margin-bottom: 0.5rem;
    color: #a5d8ff;
    text-decoration: none;
    font-size: 0.9rem;
}

.back-to-list:hover {
    text-decoration: underline;
}

/* Make sure game-list cells are not inheriting italics from global td rule */
table.game-list td {
    font-style: normal;
}

h3#gameUpdated {
    margin-top: 0;
    color: black;
    transition: opacity 0.3s ease;
}

table input {
    pointer-events: none;
    border: none;
}
