/* Pełnoekranowa, dostępna obudowa legacy viewer-a ObrazJUT. */

.gigapixel-launch {
    display: block;
    margin: 1.5rem 0 2rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    color: var(--green-800);
    text-decoration: none;
    box-shadow: 0 10px 28px rgba(20, 48, 35, 0.12);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.gigapixel-launch:hover {
    transform: translateY(-2px);
    border-color: var(--green-400);
    box-shadow: 0 16px 36px rgba(20, 48, 35, 0.18);
}

.gigapixel-launch img {
    display: block;
    width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
}

.gigapixel-launch__label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.2rem 1rem;
    align-items: center;
    padding: 1rem 1.125rem;
    background: var(--green-50);
}

.gigapixel-launch__label strong {
    grid-column: 1;
    color: var(--green-900);
    font-size: 1rem;
    line-height: 1.25;
}

.gigapixel-launch__label > span:not(.gigapixel-launch__arrow) {
    grid-column: 1;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.4;
}

.gigapixel-launch__arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: var(--green-700);
    font-size: 1.5rem;
    line-height: 1;
}

.gigapixel-dialog {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    width: 100vw;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: #080c0a;
    color: #fff;
    overflow: hidden;
}

.gigapixel-dialog[open] {
    display: flex;
    flex-direction: column;
}

.gigapixel-dialog::backdrop {
    background: #080c0a;
}

body.gigapixel-viewer-open {
    overflow: hidden;
}

.gigapixel-dialog__toolbar {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 64px;
    padding: max(0.625rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.625rem max(1rem, env(safe-area-inset-left));
    background: #173f2d;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14);
}

.gigapixel-dialog__close {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 10px;
    background: #fff;
    color: #173f2d;
    font: 600 0.9rem/1 var(--ff);
    cursor: pointer;
}

.gigapixel-dialog__close:hover {
    background: #f3f8f5;
}

.gigapixel-dialog__close:focus-visible {
    outline: 3px solid #f3c969;
    outline-offset: 2px;
}

.gigapixel-dialog__title {
    overflow: hidden;
    color: #fff;
    font: 600 1.05rem/1.25 var(--ff-serif);
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gigapixel-dialog__hint {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    line-height: 1.3;
    text-align: right;
}

.gigapixel-dialog__frame {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    border: 0;
    background: #080c0a;
}

@media (max-width: 720px) {
    .gigapixel-launch__label {
        padding: 0.875rem 1rem;
    }

    .gigapixel-dialog__toolbar {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.75rem;
        min-height: 60px;
    }

    .gigapixel-dialog__close {
        padding-inline: 0.75rem;
        font-size: 0.84rem;
    }

    .gigapixel-dialog__title {
        text-align: right;
    }

    .gigapixel-dialog__hint {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gigapixel-launch {
        transition: none;
    }
}
