body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.list-group-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.list-group-item .handle {
    cursor: grab;
}

.list-group-item .content {
    flex-grow: 1;
}

.list-group-item .actions {
    display: flex;
    gap: 0.25rem;
}

.list-group-item.selected {
    background-color: #dbeafe; /* A light blue to indicate selection */
}

/* Faction indicator */
.faction-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
    vertical-align: middle;
    margin-right: 8px;
}

.faction-color-input {
    width: 50px;
    height: 38px;
    padding: 0.25rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}

.icon-preview {
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease-in-out;
}

.icon-preview:hover {
    background-color: #e9ecef;
}

/* Icon Picker Modal */
#icon-picker-body {
    max-height: 70vh;
    overflow-y: auto;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.5rem;
    text-align: center;
}

.icon-grid-item {
    cursor: pointer;
    padding: 0.75rem 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s ease-in-out;
}

.icon-grid-item:hover {
    background-color: #0d6efd;
    color: white;
}

.icon-grid-item i {
    font-size: 1.75rem;
}

/* For Board and Events Tab Toolbars */
.sticky-toolbar {
    position: sticky;
    top: 0;
    background-color: white;
    z-index: 10;
    padding-top: 0.5rem; /* Match existing padding */
}

.list-container {
    max-height: 70vh;
    overflow-y: auto;
}

/* Board Preview */
.board-preview-grid {
    display: grid;
    gap: 2px;
    background-color: #f0f0f0;
    border: 2px solid #333;
    aspect-ratio: 1 / 1;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}

.board-cell {
    position: relative;
    background-color: white;
    padding: 4px;
    font-size: 0.7em;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #ccc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.board-cell:hover {
    border-color: #0d6efd;
    box-shadow: inset 0 0 5px rgba(13, 110, 253, 0.5);
}

.board-cell .name-wrapper {
    position: relative;
    z-index: 2;
    padding: 2px;
}

.board-cell .name {
    font-weight: bold;
    word-break: break-word;
    text-align: center;
}

.board-cell-corner .name {
    font-size: 1.1em;
}

.board-cell-corner {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.board-cell-center {
    grid-column-start: 2;
    grid-row-start: 2;
    background-color: #c9e2b3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Georgia', serif;
    font-size: 2vw;
    font-weight: bold;
    color: #3e5e2a;
    text-shadow: 1px 1px 2px white;
}

.player-tokens-container {
    position: absolute;
    bottom: 2px;
    right: 2px;
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap-reverse;
    gap: 2px;
    z-index: 5;
    pointer-events: none; /* Let clicks pass through */
}

.player-token {
    font-size: 1.5em;
    line-height: 1;
    text-shadow: 0 0 2px black, 0 0 4px white;
}

.jail-visiting-area, .jail-in-jail-area {
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    z-index: 5;
    pointer-events: none;
}

.jail-visiting-area {
    top: 5px;
    left: 5px;
    right: 5px;
    justify-content: center;
}

.jail-in-jail-area {
    bottom: 5px;
    left: 5px;
    right: 5px;
    justify-content: center;
    padding: 4px;
    background: rgba(255, 165, 0, 0.5);
    border-radius: 4px;
}

.building-icons {
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 1px;
    justify-content: center;
    align-items: center;
    align-content: center;
    z-index: 3; /* Must be higher than name-wrapper */
}

.building-icons i {
    font-size: 1.1em;
    flex-basis: 45%;
    text-shadow: 0 0 3px rgba(255, 255, 255, 0.7), 0 0 3px rgba(255, 255, 255, 0.7); /* Make icons more visible */
    text-align: center;
}

/* Tooltip on mobile */
.tooltip {
  pointer-events: none;
}