/* Styles for Puzzle Results Table */
#puzzles-table {
    font-size: 0.9em;
    /* font-family: Georgia, 'Times New Roman', Times, serif; */
    width: 100% !important;
    /* table-layout: fixed; */
    /* table-layout: auto; */
    /* border-collapse: collapse; */
    border-radius: .5rem;
    overflow: hidden;
}

#puzzles-table thead th,
#puzzles-table td {
    vertical-align: middle;
    /* text-align: center; */
    padding: 0.4rem;
    border: 2px solid #dee2e6 !important;
    white-space: normal;
    word-wrap: break-word;
}

.puzzle-column {
    font-weight: bold;
    text-align: left;
    min-width: 450px;
    /* width: 20% !important; */
}

.btn-group {
    margin-bottom: 1rem;
}

.btn-group button {
    background-color: #e0e0e0;
    border: 1px solid #ccc;
    color: #333;
    padding: 0.4rem 1rem;
    cursor: pointer;
    margin-right: -1px;
}

.btn-group button:hover {
    background-color: #d0d0d0;
}

.btn-group button.active {
    background-color: #FF6C00;
    color: #fff;
}

.table-responsive > #puzzles-table {
    width: 100%;
    table-layout: fixed;
}

.emoji-legend {
    border: 1px solid #ccc;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
    background-color: #f8f9fa; /* Light grey background */
    display: inline-block; /* Make it wrap content width */
}

.emoji-legend ul,
.emoji-legend li {
    margin: 0; /* Remove default margins */
    padding: 0; /* Remove default padding */
    list-style: none; /* Remove bullet points */
}

.emoji-legend li {
    font-size: 0.9em; /* Slightly smaller font */
    line-height: 1.4; /* Tighter line spacing */
    display: inline-block; /* Display items inline */
    margin-right: 1rem; /* Add space between items */
}

.emoji-legend strong {
    display: block; /* Make title block level */
    margin-bottom: 0.3rem;
}


#puzzles-header-row {
    height: 250px; /* Adjust this value based on the length of your longest header text! */
}

/* For the <th> element that acts as the container for rotated text */
.model-header-rotated {
    position: relative; /* Establishes a containing block for the absolutely positioned child. */
    overflow: hidden;   /* Clips the child if it somehow overflows, good practice. */
    padding: 0 !important; /* Critical: Remove padding from the TH itself. */

    /* Constrain column thickness as suggested */
    width: 2.5em !important;
    max-width: 2.5em !important;
    min-width: 2.5em !important;
}

/* This rule targets an IMMEDIATE CHILD (div or span) inside the .model-header-rotated <th>. */
.model-header-rotated > div,
.model-header-rotated > span {
    position: absolute;
    white-space: nowrap; 
    /* text-align: center;  */
    /* transform-origin: bottom; */
    left: 50%;
    bottom: 0.6em;
    /* transform: translateX(-50%) rotate(-90deg); */
    transform: rotate(-90deg);
    /* padding: 0.4em 0.5em;  */

    /* Pre-rotation width (becomes height after rotation) */
    width: 0px;  /* Adjust as needed for the length of your longest header string */
}

/* Remove DataTables sort icons from header cells (matching leaderboard.css) */
#puzzles-table thead th.sorting,
#puzzles-table thead th.sorting_asc,
#puzzles-table thead th.sorting_desc {
    background-image: none !important;
}
#puzzles-table thead th.sorting::before,
#puzzles-table thead th.sorting::after,
#puzzles-table thead th.sorting_asc::before,
#puzzles-table thead th.sorting_asc::after,
#puzzles-table thead th.sorting_desc::before,
#puzzles-table thead th.sorting_desc::after {
    display: none !important;
    content: '' !important;
} 