/* ==========================================================================
   MODERN UI DESIGN SYSTEM — MODALS & OVERLAYS
   ========================================================================== */

.wd-modal-overlay,
.modal-overlay-custom,
.wd-confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: wdOverlayFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] .wd-modal-overlay,
:root[data-theme="dark"] .modal-overlay-custom,
:root[data-theme="dark"] .wd-confirm-overlay {
    background: rgba(3, 7, 18, 0.78);
}

.wd-modal-overlay.is-open,
.wd-modal-overlay.proj-pane-active,
.modal-overlay-custom.is-open,
.modal-overlay-custom.proj-pane-active,
.wd-confirm-overlay.is-open {
    display: flex !important;
}

@keyframes wdOverlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wd-modal,
.modal-content-custom,
.wd-confirm {
    position: relative;
    background: var(--color-bg-card, #ffffff);
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 16px;
    width: 100%;
    max-width: 540px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: wdModalScaleIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] .modal-content-custom,
:root[data-theme="dark"] .wd-confirm {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

@keyframes wdModalScaleIn {
    0% { opacity: 0; transform: scale(0.95) translateY(14px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.wd-modal-header,
.modal-header-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: var(--color-bg-subtle, #f8fafc);
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

:root[data-theme="dark"] .wd-modal-header,
:root[data-theme="dark"] .modal-header-custom {
    background: #0d1117;
    border-bottom-color: #30363d;
}

.wd-modal-header-title,
.modal-header-custom h3 {
    margin: 0;
    font-size: 16.5px;
    font-weight: 700;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.modal-header-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--color-brand, #1f6feb), #388bfd);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(31, 111, 235, 0.3);
}

/* ==========================================================================
   ENHANCED COMMENT COMPOSER UI/UX
   ========================================================================== */
.comment-composer-card {
    background: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e1e4e8);
    border-radius: 12px;
    margin-top: 14px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    animation: commentFormExpand 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] .comment-composer-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.comment-composer-card:focus-within {
    border-color: var(--color-brand, #1f6feb);
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15), 0 6px 20px rgba(0, 0, 0, 0.06);
}

.comment-composer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-secondary, #f6f8fa);
    border-bottom: 1px solid var(--border-color, #e1e4e8);
}

.comment-composer-author {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-main, #24292e);
}

.comment-composer-author-name {
    font-weight: 600;
    color: var(--color-text-main, #24292e);
}

.comment-composer-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(31, 111, 235, 0.1);
    color: var(--color-brand, #1f6feb);
    letter-spacing: 0.02em;
}

.comment-composer-body {
    padding: 14px 16px;
}

.comment-composer-textarea {
    width: 100%;
    min-height: 100px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-text-main, #24292e);
    resize: vertical;
    outline: none !important;
}

.comment-composer-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--bg-secondary, #f6f8fa);
    border-top: 1px solid var(--border-color, #e1e4e8);
    gap: 12px;
}

.comment-composer-hint {
    font-size: 12px;
    color: var(--color-text-muted, #586069);
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-composer-hint kbd {
    display: inline-block;
    padding: 2px 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    color: var(--color-text-main);
    background-color: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #d1d5da);
    border-radius: 4px;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.12);
}

.comment-composer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-icon-send {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-icon-send:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(31, 111, 235, 0.4);
}

.btn-icon-send svg {
    /* Slight visual adjustment for the paper plane to look perfectly centered */
    transform: translateX(-1px) translateY(1px);
}

@keyframes commentFormExpand {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================================
   ENHANCED MARKDOWN EDITOR & STACKED LIVE PREVIEW DESIGN SYSTEM
   (legado da toolbar fixa + preview separado — sem uso hoje: o editor atual
   é o contenteditable de live-editor.css. Mantido pra não quebrar nada que
   ainda referencie estas classes; candidato a remoção numa limpeza futura.)
   ========================================================================== */
.md-editor-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

/* ---- Header: icon + title/subtitle + "Dicas de Markdown" ---- */
.md-editor-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 2px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    position: relative;
}

.md-editor-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.12);
    color: var(--color-violet);
    flex-shrink: 0;
}

.md-editor-header-icon svg { width: 17px; height: 17px; }

.md-editor-header-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.md-editor-header-text strong { font-size: 14.5px; font-weight: 700; color: var(--color-text); }
.md-editor-header-text span { font-size: 12px; color: var(--color-text-muted); }

.md-editor-help-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 20px;
    border: 1px solid var(--color-violet);
    background: transparent;
    color: var(--color-violet);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.md-editor-help-btn:hover { background: var(--color-violet); color: #fff; }
.md-editor-help-btn svg { width: 14px; height: 14px; }

.md-editor-help-pop {
    position: absolute;
    top: calc(100% + 6px);
    right: 16px;
    z-index: 20;
    width: 230px;
    padding: 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.md-help-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 4px; }
.md-help-row code { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--color-teal); background: var(--color-surface-alt); padding: 2px 5px; border-radius: 4px; }
.md-help-row span { font-size: 11.5px; color: var(--color-text-muted); }

/* ---- Preview pane (on top) ---- */
.md-preview-pane {
    display: block;
    width: 100%;
    padding: 14px 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-violet);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    min-height: 70px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-text);
    transition: all 0.2s ease;
    animation: mdFadeIn 0.2s ease;
}

.md-preview-placeholder {
    font-style: italic;
    color: var(--color-text-muted);
    font-size: 12px;
}

/* ---- Preview toggle, redesigned: small link-style row right under the preview ---- */
.md-preview-toggle-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.md-preview-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 2px;
    border: none;
    background: transparent;
    color: var(--color-text-dim);
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease;
}

.md-preview-toggle svg { width: 14px; height: 14px; }
.md-preview-toggle:hover { color: var(--color-violet); }
.md-preview-toggle.is-active { color: var(--color-violet); font-weight: 600; }

/* ---- Toolbar + textarea combined shell ---- */
.md-editor-shell {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
}
.md-editor-shell:focus-within { border-color: var(--color-blue); box-shadow: 0 0 0 3px rgba(31, 111, 235, .14); }
.md-editor-shell .md-editor-toolbar { border-radius: 8px 8px 0 0; }
.md-editor-shell .lw-editor { border: none; border-radius: 0 0 8px 8px; }
.md-editor-shell .lw-editor:focus { box-shadow: none; }

.md-editor-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 8px 10px;
    background: var(--color-surface-alt);
    border: none;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
}

.md-editor-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    padding: 0;
    color: var(--color-text-dim);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.12s ease;
    position: relative;
}

.md-editor-toolbar button:hover {
    background: var(--color-surface);
    color: var(--color-violet);
    border-color: transparent;
}

.md-editor-toolbar button:active { opacity: 0.8; }
.md-editor-toolbar button svg { width: 16px; height: 16px; }

.md-editor-toolbar .md-divider {
    width: 1px;
    height: 18px;
    background: var(--color-border);
    margin: 0 4px;
    opacity: 0.5;
}

.md-editor-toolbar button.active {
    background: var(--color-violet);
    color: #ffffff;
    border-color: var(--color-violet);
}

/* Heading dropdown (H ▾) */
.md-heading-dropdown { position: relative; }

.md-heading-dropdown > button {
    width: auto !important;
    padding: 0 8px !important;
    gap: 3px;
    font-size: 12.5px;
    font-weight: 700;
}

.md-heading-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 15;
    min-width: 116px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    padding: 4px;
}

.md-heading-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 6px 8px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--color-text);
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.md-heading-menu button:hover { background: var(--color-surface-alt); color: var(--color-violet); }

/* Editor body: line-number gutter + textarea, side by side */
.md-editor-body {
    display: flex;
    align-items: stretch;
}

.md-line-numbers {
    flex-shrink: 0;
    width: 36px;
    padding: 12px 8px 12px 0;
    text-align: right;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.58;
    color: var(--color-text-dim);
    background: var(--color-surface-alt);
    border-right: 1px solid var(--color-border);
    white-space: pre;
    overflow: hidden;
    user-select: none;
}

textarea[data-markdown] {
    flex: 1;
    border: none !important;
    border-radius: 0 !important;
    background: var(--color-surface);
    color: var(--color-text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.58;
    padding: 12px 14px !important;
    transition: background-color 0.15s ease;
    resize: vertical;
    min-height: 110px;
    outline: none;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
}

textarea[data-markdown]:focus { box-shadow: none !important; }

textarea[data-markdown]::-webkit-scrollbar { width: 8px; height: 8px; }
textarea[data-markdown]::-webkit-scrollbar-track { background: transparent; }
textarea[data-markdown]::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 8px; }
textarea[data-markdown]::-webkit-scrollbar-thumb:hover { background: var(--color-violet); }

.md-line-numbers::-webkit-scrollbar { display: none; }

/* ---- Footer: word/character counter next to Save/Cancel ---- */
.md-editor-count {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
    white-space: nowrap;
}

.md-editor-count svg { color: var(--color-success, #3fb950); flex-shrink: 0; }

/* RENDERED MARKDOWN TYPOGRAPHY SYSTEM */
.md-content,
.md-preview-pane {
    overflow-wrap: break-word;
}

.md-content h1, .md-preview-pane h1 {
    font-size: 16px;
    font-weight: 700;
    margin: 10px 0 6px 0;
    padding-bottom: 0;
    border-bottom: none;
    color: var(--color-text);
}

.md-content h2, .md-preview-pane h2 {
    font-size: 14.5px;
    font-weight: 700;
    margin: 8px 0 4px 0;
    color: var(--color-violet);
}

.md-content h3, .md-preview-pane h3 {
    font-size: 13.5px;
    font-weight: 600;
    margin: 6px 0 3px 0;
    color: var(--color-text);
    opacity: 0.85;
}

.md-content code, .md-preview-pane code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    padding: 2px 5px;
    border-radius: 3px;
    background: var(--color-surface-alt);
    color: var(--color-teal);
    border: none;
}

:root[data-theme="dark"] .md-content code,
:root[data-theme="dark"] .md-preview-pane code {
    background: rgba(88, 166, 255, 0.08);
    color: #58a6ff;
}

.md-content blockquote, .md-preview-pane blockquote {
    margin: 8px 0;
    padding: 0 12px;
    border-left: 3px solid var(--color-violet);
    background: transparent;
    color: var(--color-text-muted);
    border-radius: 0;
    font-style: italic;
    font-size: 12.5px;
}

.md-content ul, .md-preview-pane ul,
.md-content ol, .md-preview-pane ol {
    margin: 6px 0;
    padding-left: 18px;
}

.md-content li, .md-preview-pane li {
    margin-bottom: 3px;
}

.md-preview-pane ol > li::marker {
    color: var(--color-violet);
    font-weight: 700;
}

.md-content del, .md-preview-pane del {
    opacity: 0.6;
}

.md-content hr, .md-preview-pane hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 10px 0;
}

@keyframes mdFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.wd-modal-close,
.modal-close-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--color-text-muted, #64748b);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.wd-modal-close:hover,
.modal-close-custom:hover {
    background: var(--color-bg-subtle, #f1f5f9);
    border-color: var(--color-border, #e2e8f0);
    color: var(--color-text-main);
    transform: scale(1.05);
}

:root[data-theme="dark"] .modal-close-custom:hover {
    background: #21262d;
    border-color: #30363d;
    color: #f0f6fc;
}

.wd-modal-body,
.modal-body-custom {
    padding: 24px;
}

.modal-footer-custom {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 18px;
    margin-top: 20px;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

:root[data-theme="dark"] .modal-footer-custom {
    border-top-color: #30363d;
}




/* Grid & Layout da Visão Geral do Projeto */
.project-desc-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

@media (max-width: 1024px) {
    .project-desc-grid {
        grid-template-columns: 1fr;
    }
}

.project-main-pane {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.project-sidebar-pane {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-card-box {
    background: var(--color-bg-card, #ffffff);
    border: 1px solid var(--color-border, #e1e4e8);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

:root[data-theme="dark"] .project-card-box {
    background: var(--color-bg-card, #161b22);
    border-color: var(--color-border, #30363d);
}

.project-box-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15.5px;
    font-weight: 600;
    margin: 0 0 14px 0;
    color: var(--color-text-main);
}

.project-box-title svg {
    width: 18px;
    height: 18px;
    color: var(--color-brand);
}

.side-title {
    font-size: 12px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--color-text-dim, #6e7681);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.side-date-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.side-date-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--color-border, #e1e4e8);
}

.side-date-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.date-label {
    color: var(--color-text-muted, #57606a);
    font-size: 12.5px;
}

.side-owner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-row-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
}

/* ==========================================================================
   VISUALIZADOR DE IMAGENS (LIGHTBOX)
   ========================================================================== */

.wd-lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 64px 56px 32px;
    overflow: auto;
    background: rgba(3, 7, 18, 0.86);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: wdOverlayFadeIn 0.16s var(--ease-out);
}

.wd-lightbox-overlay.is-open { display: flex !important; }

body.wd-lightbox-open { overflow: hidden; }

.wd-lightbox {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: auto;
}

.wd-lightbox-image {
    display: block;
    width: auto;
    height: auto;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: var(--shadow-lg);
    animation: wdModalScaleIn 0.18s var(--ease-out);
    object-fit: contain;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.wd-lightbox-image.is-fit {
    max-width: min(calc(100vw - 112px), 100%);
    max-height: calc(100vh - 120px);
    cursor: zoom-in;
}

.wd-lightbox-image.is-original {
    max-width: none;
    max-height: none;
    cursor: zoom-out;
}

.wd-lightbox-btn[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.22);
}

.wd-lightbox-bar {
    position: fixed;
    top: 16px;
    left: 24px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.92);
}

.wd-lightbox-caption {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wd-lightbox-counter {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.66);
}

.wd-lightbox-btn,
.wd-lightbox-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
    cursor: pointer;
    transition: background-color .15s var(--ease-out), transform .12s var(--ease-out);
}

.wd-lightbox-btn svg,
.wd-lightbox-nav svg { width: 18px; height: 18px; }

.wd-lightbox-btn:hover,
.wd-lightbox-nav:hover { background: rgba(255, 255, 255, 0.18); }

.wd-lightbox-btn:active,
.wd-lightbox-nav:active { transform: scale(.92); }

.wd-lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}
.wd-lightbox-prev { left: 16px; }
.wd-lightbox-next { right: 16px; }
.wd-lightbox-nav:active { transform: translateY(-50%) scale(.92); }
.wd-lightbox-nav[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
    .wd-lightbox-overlay,
    .wd-lightbox-image { animation: none; }
}

@media (max-width: 700px) {
    .wd-lightbox-overlay { padding: 60px 12px 24px; touch-action: pan-x pan-y; }
    .wd-lightbox { gap: 6px; }
    .wd-lightbox-bar { left: 12px; right: 12px; }
    .wd-lightbox-image.is-fit { max-width: calc(100vw - 24px); }
    .wd-lightbox-prev { left: 8px; }
    .wd-lightbox-next { right: 8px; }
}
