/*
 * MaxDTF Upload — wspólny arkusz stylów uploadera (metraż + Formatki), etap B scalenia, część 2.
 * Bloki wspólne dla obu trybów są raz; bloki jednego trybu stoją w miejscu, w którym stały w jego arkuszu.
 */
.maxdtf-direct-uploader {
    margin: 18px 0 22px;
    padding: 18px;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 8px;
    background: rgba(255,255,255,.55);
}

.maxdtf-upload-title {
    margin-bottom: 8px;
    font-size: 1.05em;
    font-weight: 700;
}

.maxdtf-upload-title .required {
    color: #b32d2e;
}

.maxdtf-upload-help {
    margin-bottom: 12px;
    opacity: .85;
}

.maxdtf-upload-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.maxdtf-upload-progress-wrap {
    margin-top: 14px;
}

.maxdtf-upload-progress-wrap progress {
    display: block;
    width: 100%;
    height: 18px;
}

#maxdtf-upload-percent {
    margin-top: 4px;
    font-size: .92em;
}

.maxdtf-upload-status {
    margin-top: 10px;
    white-space: pre-wrap;
}

.maxdtf-upload-status.is-success {
    color: #16733c;
}

.maxdtf-upload-status.is-error {
    color: #b32d2e;
}

.maxdtf-upload-status.is-info {
    color: #555;
}

.maxdtf-upload-files {
    margin-top: 14px;
}

.maxdtf-upload-files-label {
    font-weight: 600;
}

#maxdtf-upload-file-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.maxdtf-upload-file-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin: 6px 0;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 6px;
}

.maxdtf-upload-file-name {
    overflow-wrap: anywhere;
}

.maxdtf-upload-remove {
    border: 0;
    background: transparent;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .maxdtf-upload-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .maxdtf-upload-file-item {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* 0.4.1 — File Check */

.maxdtf-file-check {
    margin-top: 14px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.maxdtf-file-check-title {
    padding: 12px 14px 6px;
    font-weight: 700;
}

.maxdtf-file-check-summary {
    margin: 6px 12px 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 600;
}

.maxdtf-file-check-summary.is-ok {
    background: #eaf8ef;
    color: #166534;
}

.maxdtf-file-check-summary.is-warning,
.maxdtf-file-check-summary.is-unknown {
    background: #fff7e6;
    color: #8a5200;
}

.maxdtf-file-check-summary.is-critical {
    background: #fff0f0;
    color: #a61b1b;
}

.maxdtf-file-check-items {
    border-top: 1px solid rgba(0,0,0,.08);
}

.maxdtf-file-check-row {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,0,0,.07);
}

.maxdtf-file-check-row:last-child {
    border-bottom: 0;
}

.maxdtf-file-check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-weight: 700;
}

.maxdtf-file-check-row.is-ok .maxdtf-file-check-icon {
    background: #eaf8ef;
    color: #166534;
}

.maxdtf-file-check-row.is-warning .maxdtf-file-check-icon,
.maxdtf-file-check-row.is-unknown .maxdtf-file-check-icon {
    background: #fff7e6;
    color: #8a5200;
}

.maxdtf-file-check-row.is-critical .maxdtf-file-check-icon {
    background: #fff0f0;
    color: #a61b1b;
}

.maxdtf-file-check-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
}

.maxdtf-file-check-value {
    font-weight: 600;
    text-align: right;
}

.maxdtf-file-check-message {
    margin-top: 3px;
    font-size: .9em;
    opacity: .78;
}

.maxdtf-file-check-ack {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0;
    padding: 12px;
    background: #fff7e6;
    border-top: 1px solid #ead6a0;
    cursor: pointer;
}

.maxdtf-file-check-ack input {
    margin-top: 3px;
    flex: 0 0 auto;
}

.maxdtf-upload-file-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.maxdtf-file-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: .78em;
    font-weight: 600;
}

.maxdtf-file-badge.is-ok {
    background: #eaf8ef;
    color: #166534;
}

.maxdtf-file-badge.is-warning,
.maxdtf-file-badge.is-unknown {
    background: #fff7e6;
    color: #8a5200;
}

@media (max-width: 640px) {
    .maxdtf-file-check-top {
        flex-direction: column;
        gap: 2px;
    }

    .maxdtf-file-check-value {
        text-align: left;
    }
}

/* 0.4.3 — popup podglądu i normalizacja produkcyjnego PNG */

.maxdtf-modal-open {
    overflow: hidden;
}

.maxdtf-preview-modal[hidden] {
    display: none !important;
}

.maxdtf-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.maxdtf-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 25, .72);
    backdrop-filter: blur(2px);
}

.maxdtf-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(1180px, 96vw);
    max-height: 92vh;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0,0,0,.32);
    padding: 24px;
}

.maxdtf-preview-close {
    position: absolute;
    right: 14px;
    top: 10px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
}

.maxdtf-preview-header h3 {
    margin: 0 40px 4px 0;
    font-size: 24px;
}

.maxdtf-preview-filename {
    color: #666;
    overflow-wrap: anywhere;
}

.maxdtf-preview-grid {
    display: grid;
    grid-template-columns: minmax(280px, .95fr) minmax(360px, 1.05fr);
    gap: 22px;
    margin-top: 18px;
}

.maxdtf-preview-visual {
    position: sticky;
    top: 0;
    align-self: start;
}

.maxdtf-preview-stage {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    height: clamp(340px, 50vh, 540px);
    min-height: 0;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 10px;
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #e9e9e9 25%, transparent 25%),
        linear-gradient(-45deg, #e9e9e9 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e9e9e9 75%),
        linear-gradient(-45deg, transparent 75%, #e9e9e9 75%);
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.maxdtf-preview-stage.is-previewable {
    cursor: zoom-in;
}

.maxdtf-preview-stage.is-previewable::after {
    content: "Kliknij, aby powiększyć";
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 4;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(17,17,25,.78);
    color: #fff;
    font-size: 12px;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.maxdtf-preview-stage .maxdtf-preview-canvas {
    display: block !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    transform-origin: center center !important;
    float: none !important;
    clear: none !important;
    inset: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: inherit !important;
}

.maxdtf-preview-stage .maxdtf-preview-decoder {
    display: none !important;
}

.maxdtf-preview-stage object {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
    background: #fff;
}

.maxdtf-preview-placeholder {
    padding: 32px;
    text-align: center;
    color: #666;
}

.maxdtf-preview-note {
    margin-top: 8px;
    font-size: .84em;
    color: #777;
}

.maxdtf-preview-source-info {
    padding: 10px 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    background: #f6f7f7;
    font-weight: 600;
}

.maxdtf-no-dpi-note {
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #eef4ff;
    color: #284b80;
}

.maxdtf-optimal-box {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 10px;
    align-items: center;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #d9d9e7;
    border-radius: 9px;
}

.maxdtf-optimal-box > div,
.maxdtf-optimal-box > strong {
    grid-column: 1;
}

.maxdtf-optimal-box .button {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.maxdtf-target-width-label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
}

.maxdtf-target-width-row {
    display: flex;
    align-items: center;
    gap: 7px;
}

.maxdtf-target-width-row input {
    width: 140px;
    max-width: 100%;
}

.maxdtf-target-height,
.maxdtf-target-dpi {
    margin-top: 6px;
}

.maxdtf-modal-checks {
    margin-top: 16px;
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 9px;
    overflow: hidden;
}

.maxdtf-modal-check {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 9px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0,0,0,.07);
}

.maxdtf-modal-check:last-child { border-bottom: 0; }

.maxdtf-modal-check-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-weight: 800;
}

.maxdtf-modal-check-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.maxdtf-modal-check-message {
    margin-top: 3px;
    color: #666;
    font-size: .9em;
}

.maxdtf-modal-check.is-ok .maxdtf-modal-check-icon,
.maxdtf-modal-check.is-info .maxdtf-modal-check-icon,
.maxdtf-file-check-row.is-info .maxdtf-file-check-icon {
    background: #eaf8ef;
    color: #166534;
}

.maxdtf-modal-check.is-warning .maxdtf-modal-check-icon {
    background: #fff4cc;
    color: #8a5200;
}

.maxdtf-modal-check.is-danger .maxdtf-modal-check-icon,
.maxdtf-file-check-row.is-danger .maxdtf-file-check-icon {
    background: #ffe7e7;
    color: #a61b1b;
}

.maxdtf-modal-check.is-critical .maxdtf-modal-check-icon {
    background: #ffdada;
    color: #8b0000;
}

.maxdtf-preview-ack {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 14px;
    padding: 12px;
    background: #fff7e6;
    border: 1px solid #ead6a0;
    border-radius: 8px;
}

.maxdtf-preview-ack input {
    margin-top: 3px;
}

.maxdtf-preview-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(0,0,0,.1);
}

@media (max-width: 800px) {
    .maxdtf-preview-modal { padding: 10px; }
    .maxdtf-preview-dialog { padding: 18px; max-height: 96vh; }
    .maxdtf-preview-grid { grid-template-columns: 1fr; }
    .maxdtf-preview-visual { position: static; }
    .maxdtf-preview-stage { height: min(58vh, 420px); min-height: 260px; padding: 10px; }
    .maxdtf-preview-stage object { height: 100%; }
    .maxdtf-optimal-box { grid-template-columns: 1fr; }
    .maxdtf-optimal-box .button { grid-column: 1; grid-row: auto; }
    .maxdtf-preview-actions { flex-direction: column-reverse; }
}

/* 0.4.4 — pełnoekranowy podgląd */

.maxdtf-fullscreen-preview[hidden] {
    display: none !important;
}

.maxdtf-fullscreen-preview {
    position: fixed;
    inset: 0;
    z-index: 1000002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.maxdtf-fullscreen-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8,8,14,.94);
    backdrop-filter: blur(4px);
}

.maxdtf-fullscreen-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.maxdtf-fullscreen-stage {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 10px;
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #dedede 25%, transparent 25%),
        linear-gradient(-45deg, #dedede 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #dedede 75%),
        linear-gradient(-45deg, transparent 75%, #dedede 75%);
    background-size: 28px 28px;
    background-position: 0 0, 0 14px, 14px -14px, -14px 0;
}

.maxdtf-fullscreen-stage img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: calc(100vw - 52px) !important;
    max-height: calc(100vh - 86px) !important;
    margin: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
    position: static !important;
    inset: auto !important;
    background: transparent !important;
}

.maxdtf-fullscreen-stage object {
    width: calc(100vw - 52px);
    height: calc(100vh - 86px);
    max-width: 100%;
    max-height: 100%;
    background: #fff;
}

.maxdtf-fullscreen-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.74);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.maxdtf-fullscreen-caption {
    flex: 0 0 auto;
    padding: 8px 4px 0;
    color: rgba(255,255,255,.82);
    text-align: center;
    font-size: 13px;
}

@media (max-width: 800px) {
    .maxdtf-fullscreen-preview { padding: 8px; }

    .maxdtf-fullscreen-stage img {
        max-width: calc(100vw - 16px) !important;
        max-height: calc(100vh - 64px) !important;
    }

    .maxdtf-fullscreen-stage object {
        width: calc(100vw - 16px);
        height: calc(100vh - 64px);
    }
}

/* 0.4.6 — przycisk browser fullscreen */

.maxdtf-browser-fullscreen {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 6;
    min-height: 42px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(0,0,0,.74);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.maxdtf-browser-fullscreen:hover {
    background: rgba(0,0,0,.9);
}

.maxdtf-browser-fullscreen kbd {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 5px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font: inherit;
    font-size: 11px;
}

@media (max-width: 640px) {
    .maxdtf-browser-fullscreen span,
    .maxdtf-browser-fullscreen kbd {
        display: none;
    }

    .maxdtf-browser-fullscreen {
        width: 44px;
        justify-content: center;
        padding: 8px;
        font-size: 20px;
    }
}

/* 0.4.7 — canvas zachowuje prawdziwą przezroczystość PNG */

.maxdtf-preview-canvas[hidden] {
    display: none !important;
}

/* 0.4.9 — cały mini-podgląd jest jednym canvasem */

.maxdtf-preview-stage.has-canvas-preview {
    background-image: none !important;
    background-color: transparent !important;
}

/* ==========================================================================
   0.5.0 — PDF.js + TIFF preview
   ========================================================================== */

.maxdtf-tiff-preview-tools {
    margin-top: 14px;
    text-align: center;
}

.maxdtf-tiff-preview-tools .button {
    margin: 4px;
}

.maxdtf-tiff-preview-status {
    margin-top: 10px;
    max-width: 420px;
    line-height: 1.45;
    color: #555;
}

.maxdtf-preview-placeholder {
    position: relative;
    z-index: 2;
    max-width: 90%;
    text-align: center;
}

.maxdtf-preview-placeholder.is-working::before {
    content: "";
    display: block;
    width: 28px;
    height: 28px;
    margin: 0 auto 12px;
    border: 3px solid rgba(0,0,0,.14);
    border-top-color: rgba(0,0,0,.66);
    border-radius: 50%;
    animation: maxdtf-preview-spin .85s linear infinite;
}

@keyframes maxdtf-preview-spin {
    to { transform: rotate(360deg); }
}

.maxdtf-fullscreen-canvas[hidden] {
    display: none !important;
}

.maxdtf-fullscreen-canvas {
    display: block;
    max-width: calc(100vw - 52px);
    max-height: calc(100vh - 86px);
    margin: auto;
    background: transparent;
}

@media (max-width: 800px) {
    .maxdtf-fullscreen-canvas {
        max-width: calc(100vw - 16px);
        max-height: calc(100vh - 64px);
    }
}

/* ==========================================================================
   0.5.1 — poprawki PDF fullscreen + duży TIFF
   ========================================================================== */

/* WordPress/theme potrafił ignorować hidden na przyciskach. */

.maxdtf-tiff-preview-tools[hidden],
#maxdtf-tiff-preview-cancel[hidden],
#maxdtf-tiff-preview-generate[hidden] {
    display: none !important;
}

/*
 * Zamiast dużego białego prostokąta pokazujemy kompaktowy komunikat
 * na szachownicy.
 */

.maxdtf-preview-placeholder {
    width: auto !important;
    max-width: min(86%, 430px) !important;
    padding: 18px 22px !important;
    margin: auto !important;
    box-sizing: border-box !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: rgba(24, 24, 31, .82) !important;
    color: #fff !important;
    box-shadow: 0 8px 30px rgba(0,0,0,.18) !important;
    backdrop-filter: blur(2px);
}

.maxdtf-preview-placeholder #maxdtf-preview-placeholder-text,
.maxdtf-preview-placeholder .maxdtf-tiff-preview-status {
    color: #fff !important;
}

.maxdtf-preview-placeholder .button {
    min-height: 42px;
}

.maxdtf-preview-placeholder.is-working::before {
    border-color: rgba(255,255,255,.25) !important;
    border-top-color: #fff !important;
}

/* Gdy PDF/TIFF ma podgląd canvas, placeholder nie może go przykrywać. */

.maxdtf-preview-stage.has-canvas-preview .maxdtf-preview-placeholder {
    display: none !important;
}

/* ==========================================================================
   0.5.2 — fullscreen document viewer + hidden-state hardening
   ========================================================================== */

#maxdtf-preview-image[hidden],
#maxdtf-preview-canvas[hidden],
#maxdtf-preview-pdf[hidden],
#maxdtf-preview-placeholder[hidden],
#maxdtf-fullscreen-image[hidden],
#maxdtf-fullscreen-canvas[hidden],
#maxdtf-fullscreen-pdf[hidden],
#maxdtf-fullscreen-tools[hidden],
#maxdtf-scroll-progress[hidden],
#maxdtf-modal-ack-wrap[hidden] {
    display: none !important;
}

#maxdtf-modal-ack-wrap { display: flex; }

#maxdtf-modal-ack-wrap.is-hidden { display: none !important; }

.maxdtf-fullscreen-stage.is-document-viewer {
    display: block !important;
    overflow: auto !important;
    overscroll-behavior: contain;
    padding: 26px !important;
    box-sizing: border-box !important;
    scroll-behavior: auto;
    cursor: default;
    align-items: initial !important;
    justify-content: initial !important;
}

.maxdtf-fullscreen-stage.is-document-viewer .maxdtf-fullscreen-canvas {
    display: block !important;
    position: relative !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 auto !important;
    background: transparent !important;
    box-shadow: 0 8px 28px rgba(0,0,0,.22);
}

.maxdtf-fullscreen-stage:not(.is-document-viewer) {
    overflow: hidden;
}

.maxdtf-fullscreen-tools {
    position: absolute;
    top: 10px;
    left: 50%;
    z-index: 8;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(0,0,0,.72);
    color: #fff;
    box-shadow: 0 4px 18px rgba(0,0,0,.22);
    backdrop-filter: blur(4px);
}

.maxdtf-fullscreen-tool-button {
    min-height: 32px;
    padding: 5px 11px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    background: rgba(255,255,255,.1);
    color: #fff;
    cursor: pointer;
    font-size: 13px;
}

.maxdtf-fullscreen-tool-button:hover { background: rgba(255,255,255,.2); }

.maxdtf-zoom-label {
    min-width: 48px;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
}

.maxdtf-zoom-hint {
    color: rgba(255,255,255,.76);
    font-size: 12px;
    white-space: nowrap;
}

.maxdtf-scroll-progress {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 8;
    width: min(520px, calc(100vw - 120px));
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 1fr 46px;
    gap: 9px;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,.70);
    color: #fff;
    pointer-events: none;
    backdrop-filter: blur(4px);
}

.maxdtf-scroll-progress-track {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
}

.maxdtf-scroll-progress-bar {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: rgba(255,255,255,.95);
    transition: width .08s linear;
}

.maxdtf-scroll-progress-label {
    text-align: right;
    font-size: 12px;
    font-weight: 700;
}

.maxdtf-preview-stage:not(.has-canvas-preview) #maxdtf-preview-pdf,
.maxdtf-preview-stage:not(.has-canvas-preview) #maxdtf-preview-image,
.maxdtf-preview-stage:not(.has-canvas-preview) #maxdtf-preview-canvas {
    background: transparent !important;
}

@media (max-width: 800px) {
    .maxdtf-fullscreen-stage.is-document-viewer { padding: 16px !important; }
    .maxdtf-fullscreen-tools { top: 8px; max-width: calc(100vw - 120px); }
    .maxdtf-zoom-hint { display: none; }
    .maxdtf-scroll-progress { bottom: 28px; width: calc(100vw - 70px); }
}

/* 0.5.3 — jeden adaptacyjny podgląd dla popupu i fullscreen */

.maxdtf-fullscreen-stage.is-document-viewer .maxdtf-fullscreen-canvas {
    /* JS ustawia dokładnie 80% dostępnej szerokości w trybie Fit. */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ==========================================================================\n   0.5.4 — workflow plików i kopii\n   ========================================================================== */

.maxdtf-direct-uploader {
    padding: 0;
    border: 0;
    background: transparent;
}

.maxdtf-uploaded-panel,
.maxdtf-add-file-panel {
    margin: 14px 0;
    padding: 18px;
    border: 1px solid rgba(0,0,0,.14);
    border-radius: 10px;
    background: rgba(255,255,255,.62);
}

.maxdtf-uploaded-panel[hidden] { display:none !important; }

.maxdtf-uploaded-panel .maxdtf-upload-files-label {
    margin-bottom: 12px;
    font-size: 1.02em;
    font-weight: 700;
}

#maxdtf-upload-file-list { margin:0; }

.maxdtf-upload-file-item {
    display:block;
    margin: 9px 0;
    padding: 13px 14px;
    border-radius: 9px;
    background: rgba(255,255,255,.72);
}

.maxdtf-upload-file-content { width:100%; min-width:0; }

.maxdtf-upload-file-top {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:16px;
}

.maxdtf-upload-file-left { gap:6px; }

.maxdtf-upload-file-name { font-weight:500; }

.maxdtf-upload-file-details {
    display:flex;
    flex-wrap:wrap;
    gap:8px 24px;
    margin-top:10px;
    padding-top:9px;
    border-top:1px solid rgba(0,0,0,.08);
}

.maxdtf-upload-file-details > div {
    display:flex;
    gap:6px;
    align-items:baseline;
}

.maxdtf-upload-file-details span { opacity:.72; }

.maxdtf-copies-row {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-top:11px;
}

.maxdtf-copies-label { font-weight:600; }

.maxdtf-copies-control {
    display:inline-flex;
    align-items:stretch;
    border:1px solid rgba(0,0,0,.18);
    border-radius:7px;
    overflow:hidden;
    background:#fff;
}

.maxdtf-copy-button {
    width:36px;
    min-width:36px;
    border:0 !important;
    border-radius:0 !important;
    background:#f5f5f5 !important;
    color:#222 !important;
    font-size:20px;
    line-height:1;
    cursor:pointer;
}

.maxdtf-copy-button:disabled { opacity:.35; cursor:not-allowed; }

.maxdtf-copies-input {
    box-sizing:border-box;
    width:64px !important;
    min-width:64px !important;
    height:38px !important;
    margin:0 !important;
    padding:5px 6px !important;
    border:0 !important;
    border-left:1px solid rgba(0,0,0,.12) !important;
    border-right:1px solid rgba(0,0,0,.12) !important;
    border-radius:0 !important;
    text-align:center;
    font-weight:700;
    -moz-appearance:textfield;
}

.maxdtf-copies-input::-webkit-outer-spin-button,
.maxdtf-copies-input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }

.maxdtf-upload-total {
    display:flex;
    justify-content:space-between;
    gap:18px;
    margin-top:13px;
    padding-top:12px;
    border-top:2px solid rgba(0,0,0,.10);
    font-size:1.03em;
}

.maxdtf-upload-total strong { white-space:nowrap; }

/* Checkbox i zdublowany raport poza popupem nie są już elementami interfejsu. */

#maxdtf-file-check,
#maxdtf-file-check-ack-wrap { display:none !important; }

@media (max-width:640px) {
    .maxdtf-upload-file-top,
    .maxdtf-copies-row,
    .maxdtf-upload-total { align-items:flex-start; flex-direction:column; }
    .maxdtf-upload-remove { padding-left:0; }
}

/* ==========================================================================
   0.5.5 — MaxDTF jako jedyne źródło metrów i ceny
   ========================================================================== */

.maxdtf-legacy-meter-hidden {
    display: none !important;
}

.maxdtf-upload-pricing {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0,0,0,.08);
}

.maxdtf-upload-pricing[hidden] {
    display: none !important;
}

.maxdtf-upload-pricing > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 4px 0;
}

.maxdtf-upload-pricing .is-total {
    font-weight: 700;
}

.maxdtf-upload-pricing strong {
    white-space: nowrap;
}

@media (max-width:640px) {
    .maxdtf-upload-pricing > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}

/* 0.5.6 — granice pliku, kolejka uploadów, minimum rozliczeniowe */

.maxdtf-upload-eta{margin-top:4px;font-size:12px;opacity:.78}

.maxdtf-upload-billable-row{color:#7a4a00}

.maxdtf-upload-billable-row[hidden]{display:none!important}

.maxdtf-upload-file-item.is-queue-item{border-style:dashed}

.maxdtf-upload-file-item.is-queue-item .maxdtf-file-badge.is-info{background:rgba(37,99,235,.10);color:#1d4ed8}

/* 0.6.12.5.0: plik zmieniony na dysku po akceptacji — wymaga ponownego wskazania. */

.maxdtf-file-badge.is-error{background:rgba(254,226,226,.75);color:#991b1b}

/* 0.6.12.5.0: kopie zablokowane na czas wysyłki tego pliku. */

.maxdtf-copies-row.is-locked{opacity:.55}

.maxdtf-copies-row.is-locked .maxdtf-copies-input,
.maxdtf-copies-row.is-locked .maxdtf-copy-button{cursor:not-allowed}

.maxdtf-queue-file-progress-wrap{display:grid;grid-template-columns:minmax(120px,1fr) 58px;align-items:center;gap:8px;margin-top:9px}

.maxdtf-queue-file-progress{width:100%;height:8px}

.maxdtf-queue-file-progress-text{text-align:right;font-size:12px;font-variant-numeric:tabular-nums}

.maxdtf-queue-file-error{margin-top:7px;padding:6px 8px;border:1px solid rgba(185,28,28,.25);border-radius:6px;background:rgba(254,226,226,.55);color:#991b1b;font-size:12px}

.maxdtf-fullscreen-stage .maxdtf-fullscreen-canvas:not([hidden]),
.maxdtf-fullscreen-stage .maxdtf-fullscreen-image:not([hidden]){outline:2px dashed #e11d48!important;outline-offset:-2px!important}

@media(max-width:640px){.maxdtf-queue-file-progress-wrap{grid-template-columns:1fr 48px}}

/* ==========================================================================\n   0.5.7 — UI/UX karty produktu MaxDTF\n   ========================================================================== */

:root {
    --maxdtf-accent-fallback: #d91872;
}

.maxdtf-product-configurator {
    --maxdtf-accent: var(--maxdtf-accent-fallback);
    font-size: 14px;
}

.maxdtf-add-file-panel {
    margin: 12px 0 16px !important;
    padding: 18px !important;
    border: 1px solid rgba(27,31,36,.10) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 6px 24px rgba(15,23,42,.055);
}

.maxdtf-panel-eyebrow {
    margin-bottom: 4px;
    color: var(--maxdtf-accent, var(--maxdtf-accent-fallback));
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.maxdtf-upload-title {
    margin: 0 !important;
    color: #24262b;
    font-size: 18px !important;
    font-weight: 750;
    line-height: 1.25;
}

.maxdtf-upload-intro {
    margin: 7px 0 13px;
    color: #666b73;
    font-size: 13px;
    line-height: 1.45;
}

.maxdtf-upload-help {
    margin: 0 0 12px !important;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f7f7f9;
    color: #6f7278;
    font-size: 12px;
    line-height: 1.4;
}

.maxdtf-native-file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.maxdtf-dropzone {
    display: flex;
    min-height: 150px;
    box-sizing: border-box;
    padding: 18px 14px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1.5px dashed rgba(75,79,87,.26);
    border-radius: 12px;
    background: linear-gradient(180deg,#fff,#fbfbfc);
    color: #393d44;
    cursor: pointer;
    text-align: center;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.maxdtf-dropzone:hover,
.maxdtf-dropzone:focus-visible,
.maxdtf-dropzone.is-dragover {
    outline: none;
    border-color: var(--maxdtf-accent, var(--maxdtf-accent-fallback));
    background: color-mix(in srgb, var(--maxdtf-accent, var(--maxdtf-accent-fallback)) 5%, #fff);
}

.maxdtf-dropzone.is-dragover { transform: translateY(-1px); }

.maxdtf-dropzone.is-disabled { opacity: .55; cursor: not-allowed; }

.maxdtf-dropzone[hidden] { display: none !important; }

.maxdtf-dropzone-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 3px;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--maxdtf-accent, var(--maxdtf-accent-fallback)) 10%, #fff);
    color: var(--maxdtf-accent, var(--maxdtf-accent-fallback));
}

.maxdtf-dropzone > strong { font-size: 14px; }

.maxdtf-dropzone-or { color: #94979d; font-size: 12px; }

.maxdtf-primary-action {
    min-height: 40px;
    padding: 9px 16px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: var(--maxdtf-accent, var(--maxdtf-accent-fallback)) !important;
    color: #fff !important;
    box-shadow: none !important;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    transition: filter .15s ease, opacity .15s ease, transform .15s ease;
}

.maxdtf-primary-action:hover { filter: brightness(.94); transform: translateY(-1px); }

.maxdtf-primary-action:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.maxdtf-selected-file {
    display: grid;
    gap: 13px;
    padding: 13px;
    border: 1px solid rgba(27,31,36,.11);
    border-radius: 11px;
    background: #fbfbfc;
}

.maxdtf-selected-file[hidden] { display: none !important; }

.maxdtf-selected-file-main { display:flex; align-items:center; gap:10px; min-width:0; }

.maxdtf-selected-file-icon {
    display:grid; width:34px; height:34px; flex:0 0 34px; place-items:center;
    border-radius:50%; background:#e9f8ef; color:#16733c; font-weight:800;
}

.maxdtf-selected-file-copy { min-width:0; display:flex; flex-direction:column; gap:2px; }

.maxdtf-selected-file-copy strong { overflow-wrap:anywhere; color:#292c31; line-height:1.3; }

.maxdtf-selected-file-copy span { color:#7c8087; font-size:12px; }

.maxdtf-selected-file-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }

.maxdtf-text-action {
    padding:8px 9px; border:0; background:transparent; color:#60646c; cursor:pointer; text-decoration:underline;
}

.maxdtf-upload-meta {
    display:flex;
    flex-wrap:wrap;
    gap:5px 7px;
    margin-top:10px;
}

.maxdtf-upload-meta span {
    padding:3px 7px;
    border-radius:999px;
    background:#f2f3f5;
    color:#777b82;
    font-size:10.5px;
    line-height:1.3;
}

.maxdtf-pause-action {
    margin-top:10px;
    padding:7px 11px;
    border:1px solid rgba(0,0,0,.13);
    border-radius:7px;
    background:#fff;
    color:#555;
    cursor:pointer;
}

.maxdtf-pause-action[hidden] { display:none !important; }

/* Lewa sekcja, przenoszona w miejsce starego przycisku „Sprawdź plik...” */

.maxdtf-uploaded-panel.is-relocated-left {
    --maxdtf-accent: var(--maxdtf-accent-fallback);
    box-sizing: border-box;
    width: 100%;
    margin: 12px 0 18px !important;
    padding: 16px !important;
    border: 1px solid rgba(27,31,36,.10) !important;
    border-radius: 13px !important;
    background: #fff !important;
    box-shadow: 0 5px 20px rgba(15,23,42,.045);
}

.maxdtf-upload-files-header {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:12px;
}

.maxdtf-uploaded-panel .maxdtf-upload-files-label {
    margin:0 !important;
    color:#292c31;
    font-size:17px !important;
    font-weight:750 !important;
    line-height:1.2;
}

.maxdtf-upload-count-badge {
    flex:0 0 auto;
    padding:4px 8px;
    border-radius:999px;
    background:color-mix(in srgb, var(--maxdtf-accent, var(--maxdtf-accent-fallback)) 10%, #fff);
    color:var(--maxdtf-accent, var(--maxdtf-accent-fallback));
    font-size:11px;
    font-weight:800;
}

.maxdtf-upload-empty {
    display:flex;
    align-items:center;
    gap:10px;
    padding:12px;
    border:1px dashed rgba(0,0,0,.13);
    border-radius:10px;
    background:#fafafb;
    color:#73777e;
}

.maxdtf-upload-empty[hidden] { display:none !important; }

.maxdtf-upload-empty-icon {
    display:grid; width:30px; height:30px; flex:0 0 30px; place-items:center;
    border-radius:50%; background:#f0f1f3; color:#777; font-size:20px;
}

.maxdtf-upload-empty div { display:flex; flex-direction:column; gap:1px; }

.maxdtf-upload-empty strong { color:#4c5057; font-size:12px; }

.maxdtf-upload-empty span:not(.maxdtf-upload-empty-icon) { font-size:11px; line-height:1.35; }

#maxdtf-upload-file-list[hidden],
.maxdtf-upload-summary[hidden] { display:none !important; }

.maxdtf-uploaded-panel.is-relocated-left .maxdtf-upload-file-item {
    margin:8px 0;
    padding:11px 12px;
    border:1px solid rgba(0,0,0,.09);
    background:#fcfcfd;
}

.maxdtf-uploaded-panel.is-relocated-left .maxdtf-upload-file-name { font-size:12px; font-weight:700; }

.maxdtf-uploaded-panel.is-relocated-left .maxdtf-upload-file-details { gap:5px 14px; font-size:11px; }

.maxdtf-uploaded-panel.is-relocated-left .maxdtf-copies-row { margin-top:8px; font-size:11px; }

.maxdtf-uploaded-panel.is-relocated-left .maxdtf-copies-input { width:52px!important; min-width:52px!important; height:32px!important; }

.maxdtf-uploaded-panel.is-relocated-left .maxdtf-copy-button { width:31px; min-width:31px; font-size:17px; }

.maxdtf-uploaded-panel.is-relocated-left .maxdtf-upload-total { font-size:13px; }

.maxdtf-uploaded-panel.is-relocated-left .maxdtf-upload-pricing { font-size:12px; }

.maxdtf-replaced-legacy-file-check { display:none !important; }

@media (max-width: 700px) {
    .maxdtf-add-file-panel { padding:14px !important; }
    .maxdtf-dropzone { min-height:132px; }
    .maxdtf-selected-file-actions { justify-content:stretch; }
    .maxdtf-selected-file-actions .maxdtf-primary-action { flex:1; }
    .maxdtf-uploaded-panel.is-relocated-left { padding:13px !important; }
}

/* ==========================================================================
   0.5.8 — automatyczna weryfikacja wielu plików + adaptacyjny podgląd
   ========================================================================== */

.maxdtf-preview-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-right: 38px;
}

.maxdtf-preview-title-row h3 {
    margin-right: 0 !important;
}

.maxdtf-preview-batch-progress {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: #f2f3f5;
    color: #555b63;
    font-size: 12px;
    font-weight: 800;
}

.maxdtf-preview-batch-progress[hidden] {
    display: none !important;
}

.maxdtf-modal-copies {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 0 14px;
    padding: 12px 13px;
    border: 1px solid rgba(0,0,0,.09);
    border-radius: 10px;
    background: #fafafb;
}

.maxdtf-modal-copies > div:first-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.maxdtf-modal-copies-total {
    color: #727780;
    font-size: 12px;
}

.maxdtf-modal-copies-control {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: stretch;
}

.maxdtf-modal-copies-control button,
.maxdtf-modal-copies-control input {
    box-sizing: border-box;
    height: 38px !important;
    margin: 0 !important;
}

.maxdtf-modal-copies-control button {
    width: 38px;
    min-width: 38px;
    padding: 0;
    border: 1px solid rgba(0,0,0,.16);
    background: #fff;
    color: #333;
    font-size: 20px;
    cursor: pointer;
}

.maxdtf-modal-copies-control button:first-child {
    border-radius: 8px 0 0 8px;
}

.maxdtf-modal-copies-control button:last-child {
    border-radius: 0 8px 8px 0;
}

.maxdtf-modal-copies-control button:disabled {
    opacity: .35;
    cursor: default;
}

.maxdtf-modal-copies-control input {
    width: 72px !important;
    min-width: 72px !important;
    border-top: 1px solid rgba(0,0,0,.16) !important;
    border-bottom: 1px solid rgba(0,0,0,.16) !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    text-align: center;
    font-weight: 700;
}

/* Długi pionowy projekt dostaje znacznie wyższe, pionowe pole podglądu. */

.maxdtf-preview-stage.is-portrait-document {
    height: var(--maxdtf-preview-dynamic-height, min(72vh, 720px)) !important;
}

.maxdtf-preview-grid.is-portrait-document {
    grid-template-columns: minmax(300px, .82fr) minmax(400px, 1.18fr);
}

.maxdtf-preview-grid.is-landscape-document {
    grid-template-columns: minmax(320px, .95fr) minmax(380px, 1.05fr);
}

/* Etykiety wymiarów w fullscreen dla natywnego PNG. */

.maxdtf-fullscreen-dimension-label {
    position: absolute;
    z-index: 7;
    padding: 4px 7px;
    border: 1px solid #e11d48;
    background: rgba(255,255,255,.94);
    color: #be123c;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    white-space: nowrap;
}

.maxdtf-fullscreen-dimension-label[hidden] {
    display: none !important;
}

.maxdtf-fullscreen-dimension-label.is-width {
    transform: translateX(-50%);
}

.maxdtf-fullscreen-dimension-label.is-height {
    transform: translate(-50%, -50%) rotate(-90deg);
    transform-origin: center;
}

/* Informacja o jakości renderu ekranowego PDF/TIFF. */

.maxdtf-fullscreen-quality-note {
    position: absolute;
    left: 50%;
    top: 10px;
    z-index: 9;
    max-width: min(720px, calc(100vw - 220px));
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    backdrop-filter: blur(4px);
}

.maxdtf-fullscreen-quality-note[hidden] {
    display: none !important;
}

.maxdtf-fullscreen-quality-info {
    display: inline-grid;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 50%;
    font-style: normal;
    font-weight: 800;
    cursor: help;
}

/* Na normalnej ścieżce nie pokazujemy osobnego kroku „Sprawdź plik”.
   Wiersz wybranego pliku zostaje tylko dla awaryjnego wznowienia uploadu. */

.maxdtf-selected-file:not(.is-resume-state) {
    display: none !important;
}

.maxdtf-uploaded-panel.is-gallery-fallback {
    clear: both;
    margin-top: 16px !important;
}

@media (max-width: 800px) {
    .maxdtf-preview-grid.is-portrait-document,
    .maxdtf-preview-grid.is-landscape-document {
        grid-template-columns: 1fr;
    }

    .maxdtf-preview-stage.is-portrait-document {
        height: min(68vh, 680px) !important;
    }

    .maxdtf-preview-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .maxdtf-modal-copies {
        align-items: flex-start;
        flex-direction: column;
    }

    .maxdtf-fullscreen-quality-note {
        top: 62px;
        max-width: calc(100vw - 30px);
        border-radius: 10px;
        text-align: center;
    }
}

.maxdtf-fullscreen-stage .maxdtf-fullscreen-canvas.has-baked-boundary {
    outline: none !important;
}

/* ==========================================================================
   0.5.9 — pionowy podgląd 1:1 proporcji + HUD fullscreen bez nakładania
   ========================================================================== */

/*
 * Dla pionowych projektów JS wylicza wysokość dokładnie z proporcji pliku.
 * Nie ograniczamy jej do vh/px — przewijanie obsługuje modal.
 */

.maxdtf-preview-stage.is-portrait-document {
    height: var(--maxdtf-preview-dynamic-height) !important;
    min-height: 0 !important;
    max-height: none !important;
}

@media (max-width: 800px) {
    .maxdtf-preview-stage.is-portrait-document {
        height: var(--maxdtf-preview-dynamic-height) !important;
        max-height: none !important;
    }
}

/*
 * Pasek informacji PDF/TIFF nie jest już overlayem na górze dokumentu.
 * Jest osobnym elementem flex pomiędzy stage a dolną instrukcją, więc nie
 * zasłania paska Dopasuj do szerokości / zoom.
 */

.maxdtf-fullscreen-quality-note {
    position: static !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    align-self: center;
    flex: 0 0 auto;
    max-width: min(920px, calc(100vw - 40px));
    margin: 7px auto 0;
    box-sizing: border-box;
}

@media (max-width: 800px) {
    .maxdtf-fullscreen-quality-note {
        position: static !important;
        top: auto !important;
        max-width: calc(100vw - 20px);
        margin-top: 6px;
    }
}

/* ========================================================================== 
   0.5.10 — overlay ponad motywem + zawsze widoczna stopka decyzji
   ========================================================================== */

.maxdtf-preview-modal {
    z-index: 2147483645 !important;
    isolation: isolate;
}

.maxdtf-fullscreen-preview {
    z-index: 2147483647 !important;
    isolation: isolate;
}

.maxdtf-preview-dialog {
    display: flex !important;
    flex-direction: column !important;
    width: min(1180px, 96vw);
    height: min(94dvh, calc(100dvh - 20px));
    max-height: min(94dvh, calc(100dvh - 20px)) !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.maxdtf-preview-scrollarea {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 24px 18px;
    box-sizing: border-box;
}

.maxdtf-preview-close { z-index: 20 !important; }

.maxdtf-preview-actions {
    position: relative !important;
    z-index: 15;
    flex: 0 0 auto;
    display: flex !important;
    align-items: center;
    justify-content: space-between !important;
    gap: 14px;
    margin: 0 !important;
    padding: 12px 24px !important;
    border-top: 1px solid rgba(0,0,0,.10) !important;
    background: rgba(255,255,255,.98);
    box-shadow: 0 -8px 24px rgba(0,0,0,.07);
    backdrop-filter: blur(6px);
}

.maxdtf-preview-actions-main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
}

.maxdtf-preview-remove-file {
    flex: 0 0 auto;
    border-color: rgba(185,28,28,.32) !important;
    color: #991b1b !important;
    background: #fff !important;
}

.maxdtf-preview-remove-file:hover {
    border-color: #b91c1c !important;
    background: #fff5f5 !important;
}

.maxdtf-modal-copies.is-footer-copies {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.maxdtf-modal-copies.is-footer-copies .maxdtf-modal-copies-label {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    line-height: 1.1;
    white-space: nowrap;
}

.maxdtf-modal-copies.is-footer-copies .maxdtf-modal-copies-label strong { font-size: 12px; }

.maxdtf-modal-copies.is-footer-copies .maxdtf-modal-copies-total { font-size: 10px; }

.maxdtf-preview-actions #maxdtf-preview-confirm { min-height: 42px; white-space: nowrap; }

@media (max-width: 800px) {
    .maxdtf-preview-modal { padding: 6px !important; }
    .maxdtf-preview-dialog {
        width: calc(100vw - 12px) !important;
        height: calc(100dvh - 12px) !important;
        max-height: calc(100dvh - 12px) !important;
    }
    .maxdtf-preview-scrollarea { padding: 18px 14px 14px; }
    .maxdtf-preview-actions {
        flex-direction: column !important;
        align-items: stretch;
        gap: 8px;
        padding: 10px 12px !important;
    }
    .maxdtf-preview-actions-main {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
    }
    .maxdtf-preview-remove-file { order: 2; width: 100%; }
    .maxdtf-modal-copies.is-footer-copies { flex: 1 1 auto; justify-content: flex-start; }
    .maxdtf-modal-copies.is-footer-copies .maxdtf-modal-copies-label { align-items: flex-start; }
}

/* ==========================================================================
   0.6.0 — kompaktowe ustawienie rozmiaru PNG
   ========================================================================== */

.maxdtf-target-compact-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap;
    gap: 6px !important;
    margin-bottom: 2px;
}

.maxdtf-target-compact-row input {
    width: 92px !important;
    max-width: 92px !important;
    height: 38px;
    font-weight: 700;
}

.maxdtf-target-compact-row strong {
    white-space: nowrap;
}

.maxdtf-target-separator {
    opacity: .55;
}

.maxdtf-optimal-box {
    margin-bottom: 10px;
}

.maxdtf-target-width-label {
    margin-bottom: 4px;
}

@media (max-width: 640px) {
    .maxdtf-target-compact-row input {
        width: 82px !important;
        max-width: 82px !important;
    }
}

/* 0.6.1 — duży TIFF przed wygenerowaniem preview pozostaje kompaktowy. */

.maxdtf-preview-stage.is-tiff-manual-pending,
.maxdtf-preview-stage.is-portrait-document.is-tiff-manual-pending {
    height: 460px !important;
    min-height: 360px !important;
    max-height: 520px !important;
}

.maxdtf-preview-stage.is-tiff-manual-pending .maxdtf-preview-placeholder {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

/* PNG: cały drugi wiersz ma wspólną pionową oś. */

.maxdtf-target-compact-row {
    min-height: 38px;
    align-items: center !important;
}

.maxdtf-target-compact-row > input,
.maxdtf-target-compact-row > span,
.maxdtf-target-compact-row > strong {
    align-self: center !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    line-height: 38px !important;
    vertical-align: middle !important;
}

@media (max-width: 800px) {
    .maxdtf-preview-stage.is-tiff-manual-pending,
    .maxdtf-preview-stage.is-portrait-document.is-tiff-manual-pending {
        height: 400px !important;
        min-height: 320px !important;
        max-height: 460px !important;
    }
}

/* ==========================================================================
   0.6.4 — czytelny stan generowania podglądu + klikalne puste pole plików
   ========================================================================== */

.maxdtf-upload-empty.is-clickable {
    cursor: pointer;
    user-select: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.maxdtf-upload-empty.is-clickable:hover,
.maxdtf-upload-empty.is-clickable:focus-visible {
    border-color: rgba(0, 149, 236, .48);
    background: rgba(0, 149, 236, .035);
    box-shadow: 0 0 0 3px rgba(0, 149, 236, .08);
    outline: none;
}

.maxdtf-upload-empty.is-clickable:hover .maxdtf-upload-empty-icon,
.maxdtf-upload-empty.is-clickable:focus-visible .maxdtf-upload-empty-icon {
    color: #0798e8;
}

/*
 * Dopóki PDF/TIFF faktycznie się renderuje, nie tworzymy wielometrowej pustej
 * szachownicy. Użytkownik od razu widzi spinner i komunikat.
 */

.maxdtf-preview-stage.is-preview-loading,
.maxdtf-preview-stage.is-portrait-document.is-preview-loading,
.maxdtf-preview-stage.is-landscape-document.is-preview-loading {
    height: 430px !important;
    min-height: 350px !important;
    max-height: 470px !important;
}

.maxdtf-preview-stage.is-preview-loading .maxdtf-preview-placeholder {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

@media (max-width: 800px) {
    .maxdtf-preview-stage.is-preview-loading,
    .maxdtf-preview-stage.is-portrait-document.is-preview-loading,
    .maxdtf-preview-stage.is-landscape-document.is-preview-loading {
        height: 390px !important;
        min-height: 320px !important;
        max-height: 430px !important;
    }
}

/* ==========================================================================
   0.6.5 — płynna kolejka bez zamykania popupu i bez "starego" podglądu
   ========================================================================== */

.maxdtf-verification-transition-card {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    background: rgba(0,0,0,.025);
    color: #555b64;
    text-align: center;
}

.maxdtf-verification-transition-card > strong {
    color: #30343a;
    font-size: 15px;
}

.maxdtf-verification-transition-card > span:last-child {
    max-width: 390px;
    font-size: 12px;
    line-height: 1.45;
}

.maxdtf-verification-transition-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(0,0,0,.12);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: maxdtf-verification-spin .8s linear infinite;
}

@keyframes maxdtf-verification-spin {
    to { transform: rotate(360deg); }
}

/*
 * W stanie przejściowym popup pozostaje otwarty, ale pole preview jest
 * kompaktowe. Nie pokazujemy poprzedniego canvasa ani obrazu.
 */

.maxdtf-preview-stage.is-preview-loading {
    overflow: hidden !important;
}

.maxdtf-fullscreen-stage{--maxdtf-fullscreen-safe-top:76px;--maxdtf-fullscreen-safe-bottom:48px;box-sizing:border-box!important}

.maxdtf-fullscreen-stage.is-document-viewer,.maxdtf-fullscreen-stage:not(.is-document-viewer){padding:var(--maxdtf-fullscreen-safe-top) 26px var(--maxdtf-fullscreen-safe-bottom)!important}

.maxdtf-preview-cloud-offer{margin-top:12px;padding:12px 13px;border:1px solid rgba(7,152,232,.22);border-radius:9px;background:rgba(7,152,232,.055)}

.maxdtf-preview-cloud-offer[hidden]{display:none!important}

.maxdtf-preview-cloud-offer-copy{display:grid;gap:3px}

.maxdtf-preview-cloud-offer-copy span{color:#5f6770;font-size:11px;line-height:1.45}

.maxdtf-preview-cloud-offer-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}

.maxdtf-preview-cloud-status{margin-top:7px;color:#51606d;font-size:10px}

/* ==========================================================================
   0.6.12.4.5 — per-product visibility + add-to-cart appearance
   ========================================================================== */

.maxdtf-hidden-by-product-config {
    display: none !important;
}

/* ==========================================================================
   0.6.12.4.5 — konfigurowalny przycisk „Dodaj do koszyka”
   ========================================================================== */

.maxdtf-styled-add-to-cart {
    box-sizing: border-box !important;
    width: var(--maxdtf-atc-width, 100%) !important;
    min-height: var(--maxdtf-atc-height, 58px) !important;
    font-size: var(--maxdtf-atc-font-size, 18px) !important;
    line-height: 1.15 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .58em !important;
    padding: .72em 1.15em !important;
    white-space: normal !important;
    text-align: center !important;
}

.maxdtf-styled-add-to-cart .maxdtf-add-to-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 1.18em;
    height: 1.18em;
}

.maxdtf-styled-add-to-cart .maxdtf-add-to-cart-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ========================================================================== 
   0.6.12.4.5 — kosmetyka: plik produkcyjny, licznik kopii, popup podglądów
   ========================================================================== */

.maxdtf-production-file-notice {
    display:flex;
    align-items:flex-start;
    gap:10px;
    margin:10px 0 9px;
    padding:10px 12px;
    border:1px solid rgba(219, 43, 170, .20);
    border-radius:9px;
    background:rgba(219, 43, 170, .055);
    color:#333;
    font-size:12px;
    line-height:1.5;
}

.maxdtf-production-file-notice-icon {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 22px;
    width:22px;
    height:22px;
    border-radius:50%;
    background:rgba(219, 43, 170, .13);
    color:var(--maxdtf-accent, #db2baa);
    font-weight:800;
    font-size:13px;
    line-height:1;
}

/* Jedna spójna kontrolka − | liczba | + bez „białego paska” pod inputem. */

.maxdtf-copies-control {
    --maxdtf-copy-control-height: 46px;
    height:var(--maxdtf-copy-control-height) !important;
    min-height:var(--maxdtf-copy-control-height) !important;
    align-items:stretch !important;
}

.maxdtf-copies-control .maxdtf-copy-button,
.maxdtf-copies-control .maxdtf-copies-input {
    box-sizing:border-box !important;
    height:100% !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    padding-top:0 !important;
    padding-bottom:0 !important;
    box-shadow:none !important;
    vertical-align:middle !important;
}

.maxdtf-copies-control .maxdtf-copy-button {
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    line-height:1 !important;
    padding-left:0 !important;
    padding-right:0 !important;
}

.maxdtf-copies-control .maxdtf-copies-input {
    display:block !important;
    background:#fff !important;
    color:#333 !important;
    line-height:calc(var(--maxdtf-copy-control-height) - 2px) !important;
    appearance:textfield !important;
    -webkit-appearance:none !important;
}

.maxdtf-uploaded-panel.is-relocated-left .maxdtf-copies-control {
    --maxdtf-copy-control-height: 42px;
}

.maxdtf-uploaded-panel.is-relocated-left .maxdtf-copies-input {
    height:100% !important;
}

.maxdtf-preview-preference-row {
    margin-top:8px;
    text-align:right;
}

.maxdtf-preview-preference-open,
.maxdtf-preview-cloud-change {
    appearance:none;
    border:0;
    background:transparent;
    padding:2px 0;
    color:#777;
    font:inherit;
    font-size:10px;
    text-decoration:underline;
    cursor:pointer;
}

.maxdtf-preview-preference-open:hover,
.maxdtf-preview-cloud-change:hover {
    color:var(--maxdtf-accent, #db2baa);
}

.maxdtf-preview-cloud-modal[hidden] { display:none !important; }

.maxdtf-preview-cloud-modal {
    position:fixed;
    inset:0;
    z-index:2147483646 !important;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    box-sizing:border-box;
}

.maxdtf-preview-cloud-backdrop {
    position:absolute;
    inset:0;
    background:rgba(17, 20, 27, .56);
    backdrop-filter:blur(2px);
}

.maxdtf-preview-cloud-dialog {
    position:relative;
    z-index:1;
    width:min(620px, 100%);
    max-height:min(760px, calc(100vh - 40px));
    overflow:auto;
    box-sizing:border-box;
    padding:28px;
    border-radius:16px;
    background:#fff;
    box-shadow:0 24px 80px rgba(0,0,0,.24);
    color:#222;
}

.maxdtf-preview-cloud-close {
    position:absolute;
    top:10px;
    right:12px;
    width:34px;
    height:34px;
    border:0;
    border-radius:50%;
    background:transparent;
    color:#666;
    font-size:26px;
    line-height:1;
    cursor:pointer;
}

.maxdtf-preview-cloud-icon {
    display:flex;
    align-items:center;
    justify-content:center;
    width:54px;
    height:54px;
    margin:0 auto 14px;
    border-radius:50%;
    background:rgba(219, 43, 170, .10);
    color:var(--maxdtf-accent, #db2baa);
}

.maxdtf-preview-cloud-dialog h3 {
    margin:0 38px 10px;
    text-align:center;
    font-size:22px;
    line-height:1.2;
}

.maxdtf-preview-cloud-lead,
.maxdtf-preview-cloud-browser-note {
    margin:0 auto;
    max-width:520px;
    text-align:center;
    color:#58606a;
    line-height:1.55;
}

.maxdtf-preview-cloud-lead { font-size:14px; }

.maxdtf-preview-cloud-browser-note {
    margin-top:8px;
    font-size:11px;
    color:#80858c;
}

.maxdtf-preview-cloud-step { margin-top:22px; }

.maxdtf-preview-cloud-step[hidden] { display:none !important; }

.maxdtf-preview-cloud-question {
    margin-bottom:10px;
    font-weight:700;
    text-align:center;
}

.maxdtf-preview-cloud-options {
    display:grid;
    gap:9px;
}

.maxdtf-preview-cloud-option {
    width:100%;
    box-sizing:border-box;
    display:grid;
    gap:3px;
    padding:13px 15px;
    border:1px solid rgba(0,0,0,.12);
    border-radius:10px;
    background:#fff;
    color:#222;
    text-align:left;
    cursor:pointer;
}

.maxdtf-preview-cloud-option:hover {
    border-color:var(--maxdtf-accent, #db2baa);
    background:rgba(219, 43, 170, .035);
}

.maxdtf-preview-cloud-option.is-primary {
    border-color:rgba(219, 43, 170, .30);
    background:rgba(219, 43, 170, .06);
}

.maxdtf-preview-cloud-option strong { font-size:14px; }

.maxdtf-preview-cloud-option span {
    color:#686f77;
    font-size:11px;
    line-height:1.45;
}

.maxdtf-preview-cloud-once-actions {
    display:flex;
    justify-content:center;
    gap:12px;
    flex-wrap:wrap;
}

.maxdtf-preview-cloud-change {
    display:block;
    margin:12px auto 0;
}

.maxdtf-preview-cloud-status {
    margin-top:14px;
    min-height:16px;
    color:#51606d;
    font-size:11px;
    line-height:1.45;
    text-align:center;
}

@media (max-width: 600px) {
    .maxdtf-preview-cloud-modal { padding:10px; }
    .maxdtf-preview-cloud-dialog { padding:24px 16px 20px; border-radius:13px; }
    .maxdtf-preview-cloud-dialog h3 { margin-left:28px; margin-right:28px; font-size:19px; }
    .maxdtf-preview-cloud-once-actions { display:grid; }
}

.maxdtf-upload-pricing-status {
    grid-column: 1 / -1;
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.35;
    color: #b42318;
}

.maxdtf-upload-pricing-status:empty {
    display: none;
}

/* ==========================================================================
   0.6.12.5.1 — pasek postępu podglądu PDF/TIFF i podgląd rosnący w trakcie
   ========================================================================== */

.maxdtf-preview-progress {
    width: 260px;
    max-width: 100%;
    height: 6px;
    margin: 12px auto 0;
    border-radius: 999px;
    background: rgba(255,255,255,.25);
    overflow: hidden;
}

.maxdtf-preview-progress[hidden] {
    display: none !important;
}

.maxdtf-preview-progress-bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: #fff;
    transition: width .2s linear;
}

/* Gdy obraz już rośnie na canvasie, komunikat z paskiem zjeżdża na dół zamiast znikać. */

.maxdtf-preview-stage.has-canvas-preview.is-progressive-preview .maxdtf-preview-placeholder {
    display: block !important;
    position: absolute !important;
    left: 50% !important;
    bottom: 12px !important;
    top: auto !important;
    transform: translateX(-50%);
    z-index: 5;
    padding: 12px 16px !important;
}

.maxdtf-preview-stage.is-progressive-preview .maxdtf-preview-placeholder.is-working::before,
.maxdtf-preview-stage.is-progressive-preview #maxdtf-tiff-preview-generate,
.maxdtf-preview-stage.is-progressive-preview .maxdtf-tiff-preview-status,
.maxdtf-preview-stage.is-progressive-preview.is-previewable::after {
    display: none !important;
}

.maxdtf-preview-stage.is-progressive-preview .maxdtf-tiff-preview-tools {
    margin-top: 8px;
}

/* 0.6.12.5.1 — wspólny „Anuluj” przy pasku postępu (PDF i TIFF) */

.maxdtf-preview-cancel {
    display: block;
    margin: 10px auto 0 !important;
}

#maxdtf-preview-cancel[hidden],
.maxdtf-preview-stage.is-progressive-preview #maxdtf-tiff-preview-cancel {
    display: none !important;
}

/*
 * 0.6.12.5.4 — akceptacja uwag poza obszarem przewijania: pas na całą szerokość
 * tuż nad przyciskami, zawsze widoczny (wcześniej klient musiał go doscrollować).
 */

/* 0.2.5 — informacja o progu kwotowym (ile brakuje do niższych cen) */

.maxdtf-upload-pricing > .maxdtf-upload-tier-info {
    display: block;
    margin-top: 6px;
    padding: 7px 10px;
    border-radius: 6px;
    background: #fff7e6;
    border: 1px solid #ead6a0;
    color: #5c3d00;
    font-size: 13px;
    line-height: 1.4;
}

.maxdtf-upload-pricing > .maxdtf-upload-tier-info.is-best {
    background: #ecfdf3;
    border-color: #a6e3bd;
    color: #14532d;
}

.maxdtf-upload-pricing > .maxdtf-upload-tier-info[hidden] {
    display: none !important;
}

/*
 * 0.2.8 (za metrażem 0.6.12.5.4) — akceptacja uwag poza obszarem przewijania: pas na całą szerokość
 * tuż nad przyciskami, zawsze widoczny (wcześniej klient musiał go doscrollować).
 */

.maxdtf-preview-dialog > .maxdtf-preview-ack {
    flex: 0 0 auto;
    z-index: 16;
    box-sizing: border-box;
    width: 100%;
    margin: 0 !important;
    padding: 12px 24px !important;
    border: 0 !important;
    border-top: 1px solid #ead6a0 !important;
    border-radius: 0 !important;
}

@media (max-width: 800px) {
    .maxdtf-preview-dialog > .maxdtf-preview-ack {
        padding: 10px 12px !important;
    }
}

/* 0.6.12.6.1: miniatury dodanych plików (jak w Formatkach) + powiększenie po kliknięciu. */

/* 0.2.9: miniatura, dopasowany format i ceny progów na kafelku pliku i w oknie sprawdzania */

.maxdtf-upload-file-item.has-thumb{display:flex;flex-direction:row;justify-content:flex-start;gap:12px;align-items:flex-start}

.maxdtf-file-thumb{flex:0 0 76px;width:76px;height:76px;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.1);background:#f2f3f5;display:flex;align-items:center;justify-content:center}

.maxdtf-file-thumb img{max-width:100%;max-height:100%;object-fit:contain;display:block}

.maxdtf-file-thumb.is-empty img,.maxdtf-file-thumb.is-loading img{display:none}

.maxdtf-upload-file-details > .maxdtf-file-format{display:block;flex:1 1 100%}

.maxdtf-file-format[hidden]{display:none!important}

.maxdtf-file-format-head{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap}

.maxdtf-file-format-head span{opacity:.72}

.maxdtf-file-format-caption{margin:6px 0 4px;font-size:.88em;opacity:.72}

.maxdtf-file-format.is-missing{color:#b42318;font-weight:600}

.maxdtf-tier-pills{display:flex;flex-wrap:wrap;gap:6px}

.maxdtf-upload-file-details .maxdtf-file-format span{opacity:1}

.maxdtf-upload-file-details .maxdtf-file-format-head > span,.maxdtf-upload-file-details .maxdtf-tier-pill-label{opacity:.72}

.maxdtf-upload-file-details .maxdtf-tier-pill.is-current .maxdtf-tier-pill-label{opacity:.9}

.maxdtf-tier-pill{display:inline-flex;flex-direction:column;align-items:flex-start;gap:1px;padding:4px 10px;border-radius:999px;border:1px solid rgba(0,0,0,.14);background:#fff;font-size:12px;line-height:1.25}

.maxdtf-tier-pill-label{opacity:.7}

.maxdtf-tier-pill-price{font-weight:600}

.maxdtf-tier-pill.is-current{background:#15803d;border-color:#15803d;color:#fff;font-size:13px}

.maxdtf-tier-pill.is-current .maxdtf-tier-pill-label{opacity:.9}

.maxdtf-tier-pill.is-current .maxdtf-tier-pill-price{font-weight:800;font-size:15px}

.maxdtf-file-format.is-modal{margin:0 0 12px;padding:10px 12px;border-radius:9px;border:1px solid rgba(21,128,61,.28);background:rgba(21,128,61,.06)}

@media (max-width:520px){.maxdtf-file-thumb{flex-basis:56px;width:56px;height:56px}}

.maxdtf-file-thumb.is-zoomable{cursor:zoom-in}

.maxdtf-file-thumb.is-zoomable:hover,.maxdtf-file-thumb.is-zoomable:focus-visible{border-color:#e11d48;outline:none;box-shadow:0 0 0 2px rgba(225,29,72,.18)}

.maxdtf-file-thumb.is-empty::after{content:"";width:30px;height:36px;opacity:.5;background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 30'%3E%3Cpath d='M3 1h12l6 6v21a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1z' fill='%23fff' stroke='%23555' stroke-width='1.5'/%3E%3Cpath d='M15 1v6h6' fill='none' stroke='%23555' stroke-width='1.5'/%3E%3C/svg%3E")}

html.maxdtf-thumb-lightbox-open,html.maxdtf-thumb-lightbox-open body{overflow:hidden!important}

.maxdtf-thumb-lightbox{position:fixed;inset:0;z-index:2147483647;display:flex;background:rgba(9,11,16,.96)}

.maxdtf-thumb-lightbox[hidden]{display:none!important}

.maxdtf-thumb-lightbox-stage{flex:1 1 auto;min-height:0;overflow:auto;display:flex;align-items:flex-start;justify-content:center;padding:56px 18px 18px}

.maxdtf-thumb-lightbox-image{display:block;margin:auto;max-width:min(96vw,1800px);width:auto;height:auto;box-shadow:0 8px 32px rgba(0,0,0,.35)}

.maxdtf-thumb-lightbox-close{position:fixed;top:10px;right:14px;z-index:1;width:40px;height:40px;padding:0;border:0;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;font-size:28px;line-height:38px;cursor:pointer}

.maxdtf-thumb-lightbox-close:hover,.maxdtf-thumb-lightbox-close:focus-visible{background:rgba(255,255,255,.26);outline:none}

/* ==========================================================================
   0.6.12.7.0 (W2) — MaxDTF Mixed Upload: metraż osadzony na karcie formatek.
   Jego identyfikatory mają prefiks „met-”, więc reguły po #id dostają bliźniaki
   (ta sama treść i kolejność; na karcie samodzielnej nic nie pasuje do nich).
   Wygenerowane z reguł powyżej — przy zmianie reguły #maxdtf-… popraw też bliźniaka.
   ========================================================================== */

#met-maxdtf-upload-percent {
    margin-top: 4px;
    font-size: .92em;
}

#met-maxdtf-upload-file-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

#met-maxdtf-tiff-preview-cancel[hidden],
#met-maxdtf-tiff-preview-generate[hidden] {
    display: none !important;
}

.maxdtf-preview-placeholder #met-maxdtf-preview-placeholder-text {
    color: #fff !important;
}

#met-maxdtf-preview-image[hidden],
#met-maxdtf-preview-canvas[hidden],
#met-maxdtf-preview-pdf[hidden],
#met-maxdtf-preview-placeholder[hidden],
#met-maxdtf-fullscreen-image[hidden],
#met-maxdtf-fullscreen-canvas[hidden],
#met-maxdtf-fullscreen-pdf[hidden],
#met-maxdtf-fullscreen-tools[hidden],
#met-maxdtf-scroll-progress[hidden],
#met-maxdtf-modal-ack-wrap[hidden] {
    display: none !important;
}

#met-maxdtf-modal-ack-wrap { display: flex;
}

#met-maxdtf-modal-ack-wrap.is-hidden { display: none !important;
}

.maxdtf-preview-stage:not(.has-canvas-preview) #met-maxdtf-preview-pdf,
.maxdtf-preview-stage:not(.has-canvas-preview) #met-maxdtf-preview-image,
.maxdtf-preview-stage:not(.has-canvas-preview) #met-maxdtf-preview-canvas {
    background: transparent !important;
}

#met-maxdtf-upload-file-list { margin:0;
}

#met-maxdtf-file-check,
#met-maxdtf-file-check-ack-wrap { display:none !important;
}

#met-maxdtf-upload-file-list[hidden] { display:none !important;
}

.maxdtf-preview-actions #met-maxdtf-preview-confirm { min-height: 42px; white-space: nowrap;
}

.maxdtf-preview-stage.is-progressive-preview #met-maxdtf-tiff-preview-generate {
    display: none !important;
}

#met-maxdtf-preview-cancel[hidden],
.maxdtf-preview-stage.is-progressive-preview #met-maxdtf-tiff-preview-cancel {
    display: none !important;
}

/* ==========================================================================
   0.2.19 (W2) — MaxDTF Mixed Upload: formatki osadzone na karcie metrażu.
   Ich identyfikatory mają prefiks „fmk-”, więc reguły po #id dostają bliźniaki
   (ta sama treść i kolejność; na karcie samodzielnej nic nie pasuje do nich).
   Wygenerowane z reguł powyżej — przy zmianie reguły #maxdtf-… popraw też bliźniaka.
   ========================================================================== */

#fmk-maxdtf-upload-percent {
    margin-top: 4px;
    font-size: .92em;
}

#fmk-maxdtf-upload-file-list {
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

#fmk-maxdtf-tiff-preview-cancel[hidden],
#fmk-maxdtf-tiff-preview-generate[hidden] {
    display: none !important;
}

.maxdtf-preview-placeholder #fmk-maxdtf-preview-placeholder-text {
    color: #fff !important;
}

#fmk-maxdtf-preview-image[hidden],
#fmk-maxdtf-preview-canvas[hidden],
#fmk-maxdtf-preview-pdf[hidden],
#fmk-maxdtf-preview-placeholder[hidden],
#fmk-maxdtf-fullscreen-image[hidden],
#fmk-maxdtf-fullscreen-canvas[hidden],
#fmk-maxdtf-fullscreen-pdf[hidden],
#fmk-maxdtf-fullscreen-tools[hidden],
#fmk-maxdtf-scroll-progress[hidden],
#fmk-maxdtf-modal-ack-wrap[hidden] {
    display: none !important;
}

#fmk-maxdtf-modal-ack-wrap { display: flex;
}

#fmk-maxdtf-modal-ack-wrap.is-hidden { display: none !important;
}

.maxdtf-preview-stage:not(.has-canvas-preview) #fmk-maxdtf-preview-pdf,
.maxdtf-preview-stage:not(.has-canvas-preview) #fmk-maxdtf-preview-image,
.maxdtf-preview-stage:not(.has-canvas-preview) #fmk-maxdtf-preview-canvas {
    background: transparent !important;
}

#fmk-maxdtf-upload-file-list { margin:0;
}

#fmk-maxdtf-file-check,
#fmk-maxdtf-file-check-ack-wrap { display:none !important;
}

#fmk-maxdtf-upload-file-list[hidden] { display:none !important;
}

.maxdtf-preview-actions #fmk-maxdtf-preview-confirm { min-height: 42px; white-space: nowrap;
}

.maxdtf-preview-stage.is-progressive-preview #fmk-maxdtf-tiff-preview-generate {
    display: none !important;
}

#fmk-maxdtf-preview-cancel[hidden],
.maxdtf-preview-stage.is-progressive-preview #fmk-maxdtf-tiff-preview-cancel {
    display: none !important;
}

/* Uploader i przycisk „Dodaj do koszyka” jeden pod drugim, na pełną szerokość — niezależnie od motywu
   (Betheme: .woocommerce form.cart { display:flex } układał je w jednym rzędzie, gdy nie było stylów innych wtyczek). */

.woocommerce form.cart:has(> .maxdtf-direct-uploader) {
    flex-wrap: wrap;
    align-items: flex-start;
}

.woocommerce form.cart > .maxdtf-direct-uploader,
form.cart > .maxdtf-direct-uploader {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
}

.woocommerce form.cart:has(> .maxdtf-direct-uploader) > .single_add_to_cart_button {
    margin-top: 14px;
}

/* 0.6.12.7.4 — tło podglądu do wyboru: jasna szachownica (standard) albo ciemna (białe elementy grafiki widoczne) */

/* 0.2.23-alpha (jak metraż 0.6.12.7.4) — tło podglądu do wyboru: jasna szachownica (standard) albo ciemna (białe elementy grafiki widoczne) */

.maxdtf-preview-stage.is-bg-dark:not(.has-canvas-preview),
.maxdtf-fullscreen-stage.is-bg-dark {
    background-color: #8c8c8c !important;
    background-image:
        linear-gradient(45deg, #3a3d42 25%, transparent 25%),
        linear-gradient(-45deg, #3a3d42 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #3a3d42 75%),
        linear-gradient(-45deg, transparent 75%, #3a3d42 75%) !important;
}

.maxdtf-preview-stage.is-bg-dark:not(.has-canvas-preview) .maxdtf-preview-placeholder {
    color: #fff;
}

.maxdtf-bg-switch {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0 !important;
    font-size: 13px;
    line-height: 1.2;
}

.maxdtf-bg-switch-label {
    color: inherit;
    opacity: .8;
}

.maxdtf-bg-switch .maxdtf-bg-option {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    margin: 0 !important;
    padding: 4px 10px !important;
    border: 1px solid rgba(0,0,0,.2) !important;
    border-radius: 999px !important;
    background: #fff !important;
    color: #222 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.maxdtf-bg-switch .maxdtf-bg-option.is-active {
    border-color: #222 !important;
    font-weight: 700 !important;
    box-shadow: 0 0 0 1px #222 inset !important;
}

.maxdtf-bg-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,.25);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0;
}

.maxdtf-bg-swatch.is-light {
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #d6d6d6 25%, transparent 25%),
        linear-gradient(-45deg, #d6d6d6 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #d6d6d6 75%),
        linear-gradient(-45deg, transparent 75%, #d6d6d6 75%);
}

.maxdtf-bg-swatch.is-dark {
    background-color: #8c8c8c;
    background-image:
        linear-gradient(45deg, #3a3d42 25%, transparent 25%),
        linear-gradient(-45deg, #3a3d42 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #3a3d42 75%),
        linear-gradient(-45deg, transparent 75%, #3a3d42 75%);
}

.maxdtf-bg-switch.is-fullscreen {
    position: absolute;
    left: 10px;
    bottom: 8px;
    z-index: 7;
    margin: 0 !important;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(0,0,0,.72);
    color: #fff;
}

@media (max-width: 800px) {
    .maxdtf-bg-switch.is-fullscreen { bottom: auto; top: 60px; }
}

/*
 * 0.6.12.7.6 (decyzja właściciela 05.10.2026): okno sprawdzania pliku jak w Formatkach 0.2.27–0.2.29 — sam wygląd,
 * bez połączenia z Narzędziami plików. Reguły są kopią reguł Formatek (te same klasy i wartości): na karcie Mixed
 * arkusze obu uploaderów obejmują oba okna, więc muszą mówić to samo.
 *
 * Telefon: akceptacja zastrzeżeń jest przyciskiem „Akceptuję ryzyka” — to nadal to samo pole wyboru: pole i pełne zdanie
 * zostają dla czytników ekranu, widać krótki napis w kształcie przycisku (napis i klasę „has-short” dodaje skrypt).
 */

/* 0.2.25: „Popraw plik” (MaxDTF Narzędzia plików) w oknie sprawdzania. Reguły po klasach, więc działają także
   w instancji osadzonej (prefiks met- / fmk-) bez bliźniaków. Rozmiar tekstu dziedziczony z okna (jak opisy kontroli);
   kolory przycisku z !important — motyw sklepu stylizuje .button po swojemu.
   0.2.26: przycisk z opisem (.maxdtf-repair-main) stoi w pasie wyboru obok akceptacji uwag, a przy pliku bez uwag —
   pod listą kontroli (.maxdtf-repair); skrypt przenosi go między tymi miejscami. */

.maxdtf-repair {
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px solid #c7d7fe;
    border-radius: 9px;
    background: #f5f8ff;
    color: #1f2937;
    line-height: 1.45;
}

.maxdtf-repair[hidden],
.maxdtf-repair [hidden] {
    display: none !important;
}

.maxdtf-repair-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.maxdtf-repair-main[hidden] {
    display: none !important;
}

.maxdtf-repair-main .maxdtf-repair-btn {
    flex: 0 0 auto;
    min-height: 42px;
    margin: 0 !important;
    padding: 8px 18px !important;
    border: 1px solid #1d4ed8 !important;
    border-radius: 8px !important;
    background: #1d4ed8 !important;
    color: #fff !important;
    font-size: .95em;
    font-weight: 600 !important;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    box-shadow: none !important;
    cursor: pointer;
}

.maxdtf-repair-main .maxdtf-repair-btn:hover:not(:disabled),
.maxdtf-repair-main .maxdtf-repair-btn:focus-visible {
    border-color: #1e40af !important;
    background: #1e40af !important;
}

.maxdtf-repair-main .maxdtf-repair-btn:disabled {
    opacity: .75;
    cursor: default;
}

.maxdtf-repair-main .maxdtf-repair-btn.is-quiet {
    border-color: #c7d7fe !important;
    background: #fff !important;
    color: #1d4ed8 !important;
    font-weight: 500 !important;
}

.maxdtf-repair-main .maxdtf-repair-btn.is-quiet:hover:not(:disabled),
.maxdtf-repair-main .maxdtf-repair-btn.is-quiet:focus-visible {
    border-color: #1d4ed8 !important;
    background: #eef3ff !important;
}

/* 0.2.26: otwieranie narzędzia (pobranie skryptów, odczyt dużego pliku) — kręciołek w przycisku */

.maxdtf-repair-main .maxdtf-repair-btn.is-busy::before {
    content: "";
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: .55em;
    vertical-align: -.15em;
    box-sizing: border-box;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: maxdtf-repair-spin .8s linear infinite;
}

.maxdtf-repair-main .maxdtf-repair-btn.is-quiet.is-busy::before {
    border-color: rgba(29,78,216,.3);
    border-top-color: #1d4ed8;
}

@keyframes maxdtf-repair-spin { to { transform: rotate(360deg); } }

.maxdtf-repair-hint {
    flex: 1 1 220px;
    min-width: 0;
    font-size: .9em;
}

.maxdtf-repair-hint:empty {
    display: none;
}

.maxdtf-repair-note {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin: 0 0 10px;
    color: #166534;
    font-size: .9em;
}

.maxdtf-repair-note:last-child {
    margin-bottom: 0;
}

.maxdtf-repair .maxdtf-repair-undo {
    display: inline;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    color: #1d4ed8 !important;
    font: inherit;
    text-decoration: underline;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none !important;
    cursor: pointer;
}

.maxdtf-repair-error {
    margin-top: 8px;
    color: #b42318;
    font-size: .9em;
}

.maxdtf-repair-error[hidden] {
    display: none !important;
}

/*
 * 0.2.26 (decyzja właściciela 04.10.2026): pas wyboru nad przyciskami okna — „akceptuję uwagi” ALBO „Popraw plik”.
 * Pas powstaje w skrypcie tylko z aktywnymi Narzędziami plików; akceptacja uwag jest wtedy jego dzieckiem.
 * Bez klasy „is-choice” pas nie tworzy pudełka (display: contents) i akceptacja jest pasem na całą szerokość jak od 0.2.8.
 */

.maxdtf-choice {
    display: contents;
}

.maxdtf-choice > .maxdtf-preview-ack {
    flex: 0 0 auto;
    z-index: 16;
    box-sizing: border-box;
    width: 100%;
    margin: 0 !important;
    padding: 12px 24px !important;
    border: 0 !important;
    border-top: 1px solid #ead6a0 !important;
    border-radius: 0 !important;
}

.maxdtf-choice > .maxdtf-choice-or,
.maxdtf-choice > .maxdtf-choice-repair {
    display: none;
}

.maxdtf-choice.is-choice {
    position: relative;
    z-index: 16;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 14px;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 10px 24px;
    border-top: 1px solid #ead6a0;
    background: #fffaf0;
}

/* 0.2.29: niski pasek — akceptacja i przycisk w jednym wierszu, bez osobnych pudełek (było: dwie karty obok siebie) */

.maxdtf-choice.is-choice > .maxdtf-preview-ack {
    flex: 1 1 0;
    align-items: center;
    width: auto;
    min-width: 0;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
}

.maxdtf-choice.is-choice > .maxdtf-preview-ack input {
    margin-top: 0;
}

.maxdtf-choice.is-choice > .maxdtf-choice-or {
    display: block;
    flex: 0 0 auto;
    align-self: center;
    color: #6b7280;
    font-size: .9em;
}

.maxdtf-choice.is-choice > .maxdtf-choice-repair {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    min-width: 0;
    color: #1f2937;
    line-height: 1.45;
}

/* sam „Popraw plik” (plik wymaga poprawy): przycisk z opisem na całą szerokość paska */

.maxdtf-choice.is-choice:not(.has-ack) > .maxdtf-choice-repair {
    flex: 1 1 auto;
}

/* przy akceptacji opis tego, co poprawimy, stoi przy zastrzeżeniach na liście kontroli */

.maxdtf-choice.is-choice.has-ack .maxdtf-repair-hint {
    display: none;
}

.maxdtf-choice.is-choice > .maxdtf-choice-or[hidden],
.maxdtf-choice.is-choice > .maxdtf-choice-repair[hidden] {
    display: none !important;
}

/*
 * 0.2.27 (uwaga właściciela 04.10.2026, telefon): akceptacja uwag z przyciskiem „Popraw plik” zajmowały pół ekranu.
 * Na wąskim ekranie akceptacja jest przyciskiem „Akceptuję ryzyka” — to nadal to samo pole wyboru: pole i pełne zdanie
 * zostają dla czytników ekranu, widać krótki napis w kształcie przycisku (napis i klasę „has-short” dodaje skrypt).
 * W pasie wyboru oba przyciski stoją obok siebie; pod nimi tylko to, co poprawka da (co poprawimy, widać na liście kontroli).
 */

.maxdtf-preview-ack > .maxdtf-ack-short {
    display: none;
}

.maxdtf-repair-hint.is-empty {
    display: none;
}

@media (max-width: 800px) {
    .maxdtf-choice > .maxdtf-preview-ack { padding: 10px 12px !important; }
    .maxdtf-preview-ack.has-short {
        position: relative;
        align-items: stretch;
        gap: 0;
    }
    .maxdtf-preview-ack.has-short > input[type="checkbox"] {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: 0 !important;
        opacity: 0 !important;
        pointer-events: none;
    }
    .maxdtf-preview-ack.has-short > span:not(.maxdtf-ack-short) {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: -1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0, 0, 0, 0) !important;
        clip-path: inset(50%) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }
    .maxdtf-preview-ack.has-short > .maxdtf-ack-short {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: center;
        gap: 7px;
        box-sizing: border-box;
        min-width: 0;
        min-height: 42px;
        padding: 8px;
        border: 1px solid #b7791f;
        border-radius: 8px;
        background: #fff;
        color: #6b4300;
        font-size: .95em;
        font-weight: 600;
        line-height: 1.2;
        text-align: center;
        cursor: pointer;
        -webkit-user-select: none;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    .maxdtf-preview-ack.has-short > .maxdtf-ack-short::before {
        content: "";
        flex: 0 0 auto;
        box-sizing: border-box;
        width: 18px;
        height: 18px;
        border: 2px solid #b7791f;
        border-radius: 4px;
        background: #fff;
        color: #6b4300;
        font-size: 13px;
        font-weight: 700;
        line-height: 14px;
        text-align: center;
    }
    .maxdtf-preview-ack.has-short > input:checked ~ .maxdtf-ack-short {
        border-color: #6b4300;
        background: #6b4300;
        color: #fff;
    }
    .maxdtf-preview-ack.has-short > input:checked ~ .maxdtf-ack-short::before {
        content: "\2713";
        border-color: #fff;
    }
    .maxdtf-preview-ack.has-short > input:focus-visible ~ .maxdtf-ack-short {
        outline: 2px solid #1d4ed8;
        outline-offset: 2px;
    }
    /* pas wyboru: „Akceptuję ryzyka” | albo | „Popraw plik” w jednym wierszu; akceptacja ma szerokość napisu, resztę bierze „Popraw plik” */
    .maxdtf-choice.is-choice { flex-wrap: wrap; align-items: stretch; gap: 6px 8px; padding: 8px 12px; }
    .maxdtf-choice.is-choice > .maxdtf-preview-ack.has-short {
        flex: 0 0 auto;
        min-width: 0;
        padding: 0 !important;
        border: 0 !important;
        background: none !important;
    }
    .maxdtf-choice.is-choice > .maxdtf-preview-ack.has-short > .maxdtf-ack-short { font-size: .9em; white-space: nowrap; }
    .maxdtf-choice.is-choice > .maxdtf-choice-or { align-self: center; font-size: .8em; }
    .maxdtf-choice.is-choice > .maxdtf-choice-repair,
    .maxdtf-choice.is-choice .maxdtf-repair-main { display: contents; }
    .maxdtf-choice.is-choice .maxdtf-repair-main .maxdtf-repair-btn {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        padding: 8px !important;
        font-size: .9em;
        white-space: normal;
    }
    .maxdtf-choice.is-choice .maxdtf-repair-hint { flex: 1 1 100%; order: 5; color: #4b5563; font-size: .82em; line-height: 1.35; }
    .maxdtf-choice.is-choice .maxdtf-repair-error { flex: 1 1 100%; order: 6; margin-top: 0; }
    .maxdtf-repair-main .maxdtf-repair-btn { width: 100%; white-space: normal; }
}

@media (max-width: 480px) {
    /* wąski telefon: dwa przyciski obok siebie mówią same za siebie — „albo” zabierałoby im miejsce */
    .maxdtf-choice.is-choice > .maxdtf-choice-or { display: none !important; }
}

/*
 * 0.2.29 (ustalenia z właścicielem 05.10.2026): lista kontroli w oknie sprawdzania — zastrzeżenia na górze (z opisem),
 * poprawne parametry po jednej linii z wartością, pozycje techniczne zwinięte. Układ nadaje skrypt (klasa is-v2).
 */

.maxdtf-modal-checks.is-v2 {
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.maxdtf-checks-summary {
    margin: 0 0 8px;
    color: #8a5200;
    font-weight: 700;
}

.maxdtf-checks-summary.is-critical {
    color: #a61b1b;
}

.maxdtf-checks-problems {
    display: grid;
    gap: 8px;
    margin: 0 0 12px;
}

.maxdtf-checks-problems > .maxdtf-modal-check {
    border: 1px solid #ead6a0;
    border-radius: 9px;
    background: #fffaf0;
}

.maxdtf-checks-problems > .maxdtf-modal-check.is-danger,
.maxdtf-checks-problems > .maxdtf-modal-check.is-critical {
    border-color: #f1b5b5;
    background: #fff5f5;
}

.maxdtf-checks-problems .maxdtf-modal-check-top {
    flex-wrap: wrap;
    gap: 2px 14px;
}

.maxdtf-checks-problems .maxdtf-modal-check-message {
    color: #4b5563;
}

.maxdtf-checks-ok {
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 9px;
    overflow: hidden;
}

.maxdtf-checks-ok > .maxdtf-modal-check {
    align-items: center;
    padding: 7px 12px;
}

.maxdtf-checks-ok .maxdtf-modal-check-top > span {
    color: #555;
    text-align: right;
}

.maxdtf-checks-tech {
    margin-top: 8px;
    color: #666;
    font-size: .92em;
}

.maxdtf-checks-tech > summary {
    padding: 4px 2px;
    cursor: pointer;
}

.maxdtf-checks-tech > .maxdtf-modal-check {
    padding: 8px 2px;
}

/* 0.2.29: legenda ramek pod podglądem — kolory jak ramki rysowane na podglądzie */

.maxdtf-preview-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 8px;
    color: #555;
    font-size: .85em;
}

.maxdtf-preview-legend[hidden],
.maxdtf-preview-legend [hidden] {
    display: none !important;
}

.maxdtf-preview-legend-item > i {
    display: inline-block;
    box-sizing: border-box;
    width: 20px;
    height: 11px;
    margin-right: 6px;
    border: 2px dashed #e11d48;
    vertical-align: -1px;
}

.maxdtf-preview-legend-item.is-content > i {
    border-color: #2563eb;
}

/* 0.2.29: wskazówka przy przycisku okna (etykieta przycisku jest stała) */

.maxdtf-confirm-hint {
    flex: 0 1 auto;
    min-width: 0;
    color: #6b7280;
    font-size: .85em;
    line-height: 1.25;
    text-align: right;
}

.maxdtf-confirm-hint:empty {
    display: none;
}

@media (max-width: 800px) {
    .maxdtf-preview-actions-main.has-confirm-hint { flex-wrap: wrap; }
    .maxdtf-confirm-hint { flex: 1 1 100%; text-align: center; }
}

/* 0.6.12.7.8: sklep z cenami bez podatku — kwota brutto pod sumą netto w podsumowaniu plików */

/* 0.2.30: sklep z cenami bez podatku — kwota brutto pod sumą netto w podsumowaniu plików */

.maxdtf-upload-price-gross {
    display: block;
    font-size: max(11px, .85em);
    font-weight: 400;
    opacity: .75;
    text-align: right;
}

/* 0.6.12.7.9: z dopiskiem brutto element sumy jest szerszy od samej kwoty — kwota ma stać przy prawej krawędzi, jak cena powyżej */

/* 0.2.31: z dopiskiem brutto element sumy jest szerszy od samej kwoty — kwota ma stać przy prawej krawędzi, jak cena powyżej */

.maxdtf-upload-pricing .is-total strong { text-align: right; }

@media (max-width:640px) {
    .maxdtf-upload-price-gross { text-align: left; }
    .maxdtf-upload-pricing .is-total strong { text-align: left; }
}

