/* NexusCompress Extras — Tasks 1-5 styles */

/* ===== Button text visibility fix =====
   The lime-green dark theme sets btn-primary background to #3dff8f.
   Explicitly lock the text color so simultaneous background+color transitions
   never produce invisible text. */
.btn-primary {
    color: #0a0d0b !important;
}
html:not(.dark) .btn-primary {
    color: #fff !important;
}
/* Prevent background and color from transitioning together — snap color instantly */
.btn-primary, .btn-secondary {
    transition: background 0.15s ease, filter 0.15s ease !important;
}

/* ===== Dark mode smooth transitions ===== */
html, html *, html *::before, html *::after {
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}
/* Exclude elements that should not animate (images, SVG strokes, etc.) */
html img, html svg, html canvas, html video,
html .file-progress-fill, html .batch-progress-bar,
html .zip-progress-bar, html .compare-handle,
html .compare-overlay {
    transition: none;
}

/* ===== PWA Install Banner ===== */
#pwa-install-banner {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--surface, #161922);
    border: 1px solid var(--surface-border, rgba(255,255,255,0.08));
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    font-size: 0.875rem;
    color: var(--text, #e8ecf4);
    max-width: calc(100vw - 2rem);
    white-space: nowrap;
}
#pwa-install-banner p {
    margin: 0;
    color: var(--text, #e8ecf4);
}
#pwa-install-btn {
    padding: 0.375rem 0.875rem;
    background: var(--accent, #9aa8e8);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
#pwa-install-btn:hover {
    opacity: 0.9;
}
#pwa-dismiss-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted, #8b95a8);
    font-size: 1.375rem;
    line-height: 1;
    padding: 0 0.125rem;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    #pwa-install-banner {
        white-space: normal;
        text-align: center;
        flex-wrap: wrap;
        justify-content: center;
        bottom: 0.75rem;
    }
}

/* ===== EXIF Metadata Modal ===== */
#exif-modal {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
#exif-modal.is-hidden { display: none !important; }

.exif-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.exif-modal-panel {
    position: relative;
    z-index: 1;
    background: var(--surface, #161922);
    border: 1px solid var(--surface-border, rgba(255,255,255,0.08));
    border-radius: 14px;
    padding: 1.5rem;
    max-width: 560px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}
.exif-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.125rem;
}
.exif-modal-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text, #e8ecf4);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}
.exif-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted, #8b95a8);
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.25rem;
    flex-shrink: 0;
    border-radius: 6px;
}
.exif-modal-close:hover {
    background: color-mix(in srgb, var(--text) 10%, transparent);
}
.exif-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}
.exif-table tr {
    border-bottom: 1px solid var(--surface-border, rgba(255,255,255,0.08));
}
.exif-table tr.exif-row--strip {
    background: color-mix(in srgb, var(--error, #e57373) 8%, transparent);
}
.exif-key {
    padding: 0.5rem 0.75rem 0.5rem 0;
    color: var(--text-muted, #8b95a8);
    width: 38%;
    vertical-align: top;
    white-space: nowrap;
}
.exif-val {
    padding: 0.5rem 0.5rem;
    color: var(--text, #e8ecf4);
    word-break: break-all;
}
.exif-strip {
    padding: 0.5rem 0 0.5rem 0.5rem;
    white-space: nowrap;
    vertical-align: top;
    text-align: right;
}
.exif-strip-badge {
    background: color-mix(in srgb, var(--error, #e57373) 15%, transparent);
    color: var(--error, #e57373);
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}
.exif-loading,
.exif-empty {
    color: var(--text-muted, #8b95a8);
    text-align: center;
    padding: 2rem 0;
    margin: 0;
}
.exif-note {
    font-size: 0.78rem;
    color: var(--text-muted, #8b95a8);
    margin: 0 0 0.875rem;
    line-height: 1.5;
}

/* Info button on result cards */
.icon-btn.exif-info-btn {
    font-size: 0.95rem;
}

/* ===== HEIC Converter & Format Converter file list ===== */
.heic-file-list {
    margin: 0.875rem 0 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
}
.heic-file-list:empty { display: none; }
.heic-file-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid var(--surface-border);
    font-size: 0.82rem;
}
.heic-file-item:last-child { border-bottom: none; }
.heic-file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-weight: 500;
}
.heic-file-size {
    color: var(--text-muted);
    white-space: nowrap;
    font-size: 0.78rem;
}
.heic-output-size {
    color: var(--success, #5cb896);
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.78rem;
}
.heic-actions {
    display: flex;
    gap: 0.375rem;
    align-items: center;
    margin-left: auto;
}

/* ===== Theme toggle button (guide/docs/privacy pages) ===== */
.guide-theme-toggle {
    background: color-mix(in srgb, var(--text) 6%, transparent);
    border: 1px solid var(--surface-border);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.guide-theme-toggle:hover {
    background: color-mix(in srgb, var(--text) 12%, transparent);
    color: var(--text);
}
