/**
 * Karta podglądu: pasek z nazwą i przyciskami + dokument na całą resztę ekranu.
 */
:root {
    --lvdp-bar-bg: #1d2833;
    --lvdp-bar-text: #fff;
    --lvdp-viewer-bg: #525659;
    --lvdp-accent: #fff;
}

* {
    box-sizing: border-box;
}

html,
body.lvdp-preview {
    height: 100%;
    margin: 0;
}

body.lvdp-preview {
    display: flex;
    flex-direction: column;
    background: var(--lvdp-viewer-bg);
    color: var(--lvdp-bar-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.lvdp-bar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 1rem;
    padding: .6rem 1rem;
    background: var(--lvdp-bar-bg);
}

.lvdp-bar-home {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, .72);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-decoration: none;
    text-transform: uppercase;
}

.lvdp-bar-home:hover {
    color: #fff;
}

.lvdp-bar-title {
    flex: 1 1 auto;
    margin: 0;
    overflow: hidden;
    font-size: .95rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lvdp-bar-actions {
    display: flex;
    flex: 0 0 auto;
    gap: .5rem;
}

.lvdp-btn {
    display: inline-block;
    padding: .4rem .9rem;
    border: 1px solid var(--lvdp-accent);
    border-radius: 4px;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.lvdp-btn-primary {
    background: var(--lvdp-accent);
    color: var(--lvdp-bar-bg);
}

.lvdp-btn-ghost {
    background: transparent;
    color: var(--lvdp-accent);
}

.lvdp-btn-ghost:hover {
    background: rgba(255, 255, 255, .15);
}

.lvdp-viewer {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 0;
}

.lvdp-frame {
    width: 100%;
    height: 100%;
    border: 0;
}

.lvdp-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lvdp-fallback {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding: 2rem 1.5rem;
    text-align: center;
}

.lvdp-fallback p {
    max-width: 32rem;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 575px) {
    .lvdp-bar {
        flex-wrap: wrap;
        gap: .5rem;
    }

    .lvdp-bar-title {
        flex: 1 1 100%;
        order: 3;
        white-space: normal;
    }

    .lvdp-bar-actions {
        flex: 1 1 auto;
        justify-content: flex-end;
    }
}
