/* Visor de colecciones (estampillas y cosméticos) */

.ht-col .modal-content {
    position: relative;
}

/* Tipos de colección */
.ht-col-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.ht-col-type {
    flex: 1 1 auto;
    padding: 7px 10px;
    border: 0;
    border-bottom: 2px solid #b7d6e1;
    border-radius: 4px;
    background: #ebf9ff;
    box-shadow: 0 0 1px 1px rgb(0, 134, 183);
    font: inherit;
    font-size: 0.85rem;
    font-weight: bold;
    color: #004960;
    cursor: pointer;
    white-space: nowrap;
}

.ht-col-type:hover {
    background: #fff;
}

.ht-col-type.active {
    background: #0093c2;
    border-bottom-color: #005f80;
    color: #fff;
    box-shadow: 0 0 1px 1px rgb(0, 79, 108);
}

/* Progreso total */
.ht-col-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

/* Barra .progress del sitio; aquí solo ocupa el ancho disponible. */
.ht-col-progress .progress {
    flex: 1;
    margin: 0;
}

.ht-col-progress-text {
    font-size: 0.85rem;
    font-weight: bold;
    color: #004960;
    white-space: nowrap;
}

/* Cuerpo: categorías + contenido */
.ht-col-body {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.ht-col-cats {
    flex: 0 0 190px;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 560px;
    overflow-y: auto;
    padding: 2px;
}

.ht-col-cat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 6px;
    padding: 6px 8px;
    border: 0;
    border-bottom: 2px solid #b7d6e1;
    border-radius: 4px;
    background: #ebf9ff;
    box-shadow: 0 0 1px 1px rgb(0, 134, 183);
    font: inherit;
    font-size: 0.8rem;
    font-weight: bold;
    color: #004960;
    text-align: left;
    cursor: pointer;
}

.ht-col-cat small {
    font-weight: normal;
    color: #3d6f80;
    white-space: nowrap;
}

.ht-col-cat.is-complete small {
    color: #1c9c44;
    font-weight: bold;
}

.ht-col-cat.is-complete small::after {
    content: " \2713";
}

.ht-col-cat:hover,
.ht-col-cat.active {
    background: #fff;
}

.ht-col-cat.active {
    box-shadow: 0 0 0 2px #0093c2;
}

.ht-col-main {
    flex: 1;
    min-width: 0;
}

.ht-col-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.ht-col-toolbar input,
.ht-col-toolbar select {
    height: 34px;
    padding: 0 8px;
    border: 1px solid #3fa4c9;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 0.85rem;
}

.ht-col-search {
    flex: 1 1 160px;
    min-width: 0;
}

.ht-col-cat-select {
    display: none;
}

.ht-col-legend {
    min-height: 0;
    font-size: 0.8rem;
    color: #3d6f80;
}

.ht-col-legend:not(:empty) {
    margin-bottom: 6px;
}

.ht-col-legend .fa-check-circle {
    color: #1c9c44;
}

/* Rejilla */
.ht-col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--ht-col-cell, 90px), 1fr));
    gap: 6px;
    min-height: 240px;
    padding: 8px;
    border: 1px solid #3fa4c9;
    border-radius: 6px;
    background: #bcdadb;
    align-content: start;
    transition: opacity 0.15s;
}

.ht-col.is-loading .ht-col-grid {
    opacity: 0.45;
    pointer-events: none;
}

.ht-col[data-type="stamps"] { --ht-col-cell: 90px; --ht-col-cell-h: 90px; }
.ht-col[data-type="effects"] { --ht-col-cell: 80px; --ht-col-cell-h: 120px; }
.ht-col[data-type="icons"] { --ht-col-cell: 52px; --ht-col-cell-h: 52px; }
.ht-col[data-type="backgrounds"] { --ht-col-cell: 250px; --ht-col-cell-h: 85px; }
.ht-col[data-type="names"] { --ht-col-cell: 180px; --ht-col-cell-h: 64px; }
.ht-col[data-type="sounds"] { --ht-col-cell: 70px; --ht-col-cell-h: 70px; }
.ht-col[data-type="stickers"] { --ht-col-cell: 80px; --ht-col-cell-h: 80px; }

.ht-col-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--ht-col-cell-h, 90px);
    padding: 0;
    border: 1px solid transparent;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    overflow: hidden;
}

.ht-col-item:hover,
.ht-col-item:focus-visible {
    background: rgba(255, 255, 255, 0.8);
    border-color: #0093c2;
    outline: none;
}

.ht-col-item img {
    max-width: 100%;
    max-height: 100%;
    image-rendering: pixelated;
}

.ht-col[data-type="backgrounds"] .ht-col-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
}

.ht-col-item.is-missing img,
.ht-col-item.is-missing .ht-col-render {
    opacity: 0.45;
    filter: grayscale(100%);
}

.ht-col-render {
    position: relative;
    display: block;
    width: 80px;
    height: 120px;
}

.ht-col-noimg {
    font-size: 1.5rem;
    color: #7fa9b8;
}

.ht-col-fav,
.ht-col-corner {
    position: absolute;
    top: 3px;
    z-index: 2;
    font-size: 0.8rem;
    text-shadow: 0 0 2px #fff, 0 0 2px #fff;
}

.ht-col-fav {
    left: 4px;
    color: #e6a100;
}

/* Esquina superior derecha: cantidad de stickers y "también la tienes tú". */
.ht-col-corner {
    right: 3px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.ht-col-mine {
    color: #1c9c44;
}

.ht-col-qty {
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.75rem;
    line-height: 1.2;
    text-shadow: none;
}

.ht-col-item-cat {
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 2px;
    z-index: 2;
    padding: 1px 3px;
    border-radius: 3px;
    background: rgba(0, 73, 96, 0.8);
    color: #fff;
    font-size: 0.65rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ht-col-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 10px;
    color: #3d6f80;
}

/* Sin float ni márgenes heredados del tema: icono y texto centrados en columna. */
.ht-col-empty i {
    float: none;
    margin: 0;
    font-size: 2.5rem;
    opacity: 0.7;
}

.ht-col-empty p {
    margin: 0;
    text-align: center;
    font-weight: bold;
}

/* Paginación: componente global .ht-pager (css/pager.css) */
.ht-col-pager {
    margin-top: 8px;
}

/* Móvil: categorías en un desplegable */
@media (max-width: 700px) {
    .ht-col-cats {
        display: none;
    }

    .ht-col-cat-select {
        display: block;
        flex: 1 1 100%;
    }

    .ht-col-toolbar select {
        flex: 1 1 45%;
    }

    .ht-col-type {
        flex: 1 1 30%;
        padding: 6px;
        font-size: 0.75rem;
    }

    .ht-col[data-type="stamps"] { --ht-col-cell: 70px; --ht-col-cell-h: 70px; }
    .ht-col[data-type="backgrounds"] { --ht-col-cell: 100%; }

    .ht-col-grid {
        padding: 6px;
    }
}
