/* =====================================================================================================================
   Export PDF (the section at the bottom of the Grid panel). Mobile first: every chip and button is at least 44 px tall on a phone or any
   coarse pointer (.hg-touch, sharing.css), nothing scrolls sideways, long sentences wrap. Loaded after app.css and sharing.css.
   ===================================================================================================================== */

.hg-pdf {
    margin: 4px 0 12px;
    border: 1px solid var(--hg-border);
    border-radius: 8px;
    background: var(--hg-bg-panel-alt);
    min-width: 0;
}

.hg-pdf__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--hg-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.hg-pdf__head:hover {
    color: var(--hg-accent);
}

.hg-pdf__body {
    padding: 0 12px 12px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.hg-pdf__body .hg-check {
    margin-bottom: 4px;
}

.hg-pdf__body .hg-chip:disabled,
.hg-pdf__body .hg-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.hg-pdf__progress {
    height: 10px;
    margin: 10px 0 4px;
    border-radius: 999px;
    background: var(--hg-bg);
    border: 1px solid var(--hg-border);
    overflow: hidden;
}

.hg-pdf__bar {
    height: 100%;
    background: var(--hg-accent);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.hg-pdf__bar--busy {
    animation: hg-pdf-busy 1.1s ease-in-out infinite alternate;
}

@keyframes hg-pdf-busy {
    from { margin-left: 0; }
    to { margin-left: 60%; }
}

@media (prefers-reduced-motion: reduce) {
    .hg-pdf__bar,
    .hg-pdf__bar--busy {
        transition: none;
        animation: none;
    }
}
