.app-header {
    background-color: var(--bs-app-header-minimize-bg-color);
    box-shadow: var(--bs-app-header-minimize-box-shadow);
    border-bottom: var(--bs-app-header-minimize-border-bottom);
}

.app-toolbar.app-toolbar-vk {
    background-color: #f7f7f7;
    border-bottom: 1px solid rgba(0, 0, 0, .12);
    border-top: 1px solid rgba(0, 0, 0, .12);
}

.color-editor .popover {
    max-width: 300px;
    z-index: 1010;
}

.color-editor .popover .popover-body {
    padding: 9px 14px;
}

.color-editor .popover-body>div.color-choose-content {
    padding: 5px;
    width: 270px;
    box-sizing: border-box;
}

.color-editor .choose-color.pressed,
.color-editor .available-color.pressed,
.color-editor .choose-color.selected,
.color-editor .available-color.selected {
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .8), 0 0 10px #08f, 0 0 10px #08f;
}

.color-editor .choose-color,
.color-editor .available-color {
    width: 50px;
    height: 40px;
    display: inline-block;
    border: none;
    border-radius: 3px;
    box-sizing: border-box;
    margin: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .6);
    cursor: pointer;
}

.custom-color {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
}
.custom-color input[type="color"] {
    width: 50px;
    height: 40px;
    display: inline-block;
    border: none;
    border-radius: 3px;
    box-sizing: border-box;
    margin: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .6);
    cursor: pointer;
}


/* .vocab-grid {
    display: grid;
    grid-template-rows: repeat(var(--grid-rows), 1fr);
    grid-template-columns: repeat(var(--grid-cols), 1fr);
    gap: 8px;
    width: 100%;
}

.tile-item {
    position: relative;
    border-radius: 12px;
    text-align: center;
    padding: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
} */

.vocab-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols), 1fr);
    grid-template-rows: repeat(var(--grid-rows), 1fr);
    gap: 10px;
    width: 100%;
}

/* Each tile maintains equal size and fits grid cell */
.tile-item {
    position: relative; /* needed for stretched-link or absolute children */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    padding: 5px;
    cursor: pointer;
}

.folder-icon {
    position: absolute;
    top: -9px;
    right: 5px;
    font-size: 20px;
    color: #ff9800; /* folder icon color */
    pointer-events: none; /* so the link underneath is clickable */
}

.folder-icon i.bi {
  color: var(--bs-text-muted);
}

.tile-item:hover {
    transform: scale(1.05);
    z-index: 10; /* bring hovered tile to front */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Edit button - hidden by default */
.edit-button {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    display: none; /* hidden by default */
    z-index: 10;
    padding: calc(0.40rem) calc(.75rem) !important;
    font-size: 11px;
}

/* Show edit button on hover */
.tile-item:hover .edit-button {
    opacity: 1;
    visibility: visible;
}


/* Responsive scaling */
@media (max-width: 1200px) {
    .vocab-grid {
        gap: 8px;
    }
    .tile-item {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .vocab-grid {
        gap: 6px;
    }
    .tile-item {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .vocab-grid {
        gap: 4px;
    }
    .tile-item {
        font-size: 0.7rem;
    }
}

.tile-item:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.tile-icon img {
    max-height: 70px;
    object-fit: contain;
}

.folder-tile {
    background: #ffeaa7;
}