/* ============================================================
   HP-Listy — mřížka náhledů PDF (PDF.js canvas)
   ============================================================ */

.hplisty-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 1rem 0;
}

@media (max-width: 700px) {
    .hplisty-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
    .hplisty-grid { grid-template-columns: 1fr; }
}

.hplisty-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Obal náhledu — A4 poměr, overflow hidden */
.hplisty-thumb-wrap {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.414;
    border: 1px solid #d4cfc6;
    border-radius: 3px;
    background: #f4f2ed;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.12s, box-shadow 0.12s;
    text-decoration: none;
    position: relative;
}

.hplisty-thumb-wrap:hover {
    border-color: #2b4a6f;
    box-shadow: 0 2px 8px rgba(43, 74, 111, 0.18);
}

/* Canvas vyplní celý obal */
.hplisty-thumb-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Stav načítání / chyba */
.hplisty-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #888077;
}

.hplisty-thumb-wrap--nourl {
    cursor: default;
}

.hplisty-thumb-wrap--nourl:hover {
    border-color: #d4cfc6;
    box-shadow: none;
}

/* Název dokumentu */
.hplisty-label {
    display: block;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #1a4a7a;
    text-align: center;
    text-decoration: none;
    word-break: break-word;
}

.hplisty-label:hover {
    text-decoration: underline;
    color: #c8a84b;
}

.hplisty-label--nourl {
    color: #4a4540;
    cursor: default;
}

.hplisty-label--nourl:hover {
    text-decoration: none;
    color: #4a4540;
}

.hplisty-empty {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.875rem;
    color: #888077;
    padding: 1rem 0;
}
