/* ═══════════════════════════════════════════════════════════════════════════
   androidapp.css — the staff app's Android APK modal (Run 54, U4).
   Companion of androidapp.js. Every colour is one of admin.css's tokens (or the
   panel's established amber/red/green status tints); the overlay, content,
   header, close, buttons and inputs are admin.css's own (.modal-overlay,
   .modal-content, .detail-header, .modal-close, .modal-btn, .action-btn,
   .filter-input, .note-input, .detail-label, .form-field, .field-hint) — this
   file adds only the layout the generic modal lacks.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Anchored to a fixed TOP offset, not centred like admin.css's .modal-overlay
   (the notifprefs.css lesson): the body renders a beat after the modal opens,
   and a centred modal re-centres as it grows, moving the ✕ under a fast click. */
.androidapp-overlay { align-items: flex-start; padding-top: 7.5vh; }

.androidapp-modal {
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: var(--space-lg);
}

.androidapp-head { margin-bottom: var(--space-md); }

.androidapp-status {
    margin: 0 0 var(--space-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
}
.androidapp-status:empty { display: none; }
.androidapp-status.error { color: #FCA5A5; }
.androidapp-status.ok { color: #86EFAC; }

.androidapp-body {
    overflow-y: auto;
    min-height: 0;
    margin: 0 calc(-1 * var(--space-sm));
    padding: 0 var(--space-sm);
}

.androidapp-section {
    padding: var(--space-md) 0;
    border-top: 1px solid var(--border-default);
}
.androidapp-section:first-child { border-top: 0; padding-top: 0; }

.androidapp-h {
    margin: 0 0 var(--space-sm);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.androidapp-version {
    margin: 0 0 var(--space-sm);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}
.androidapp-version strong { color: var(--text-primary); font-weight: 600; }

.androidapp-notes-text {
    margin: 0 0 var(--space-md);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-secondary);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

/* The primary action: a real link (a[download]) dressed as the panel's primary
   button, full width so it is the obvious thing to press on a phone. */
.androidapp-download {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin: 0 0 var(--space-md);
    text-decoration: none;
    text-align: center;
}
.androidapp-download:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }

.androidapp-steps {
    margin: 0 0 var(--space-sm);
    padding-left: 1.4em;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-primary);
}
.androidapp-steps li { margin-bottom: 6px; }

/* The two sideload sentences: a note, set apart from the steps (amber, its own
   size) — two styles resolving to the same size and colour read as one run-on
   paragraph (the Run 28 / Run 34 cold-read defect). */
.androidapp-note {
    margin: var(--space-sm) 0 0;
    padding: 8px 10px;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #FBBF24;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-sm);
}

.androidapp-empty {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.androidapp-test .action-btn { min-height: 44px; }

.androidapp-result,
.androidapp-upload-msg {
    margin: var(--space-sm) 0 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.androidapp-result:empty,
.androidapp-upload-msg:empty { display: none; }
.androidapp-result.ok { color: #86EFAC; }
.androidapp-result.muted { color: var(--text-secondary); }
.androidapp-result.error,
.androidapp-upload-msg.error { color: #FCA5A5; }

.androidapp-upload .form-field { margin-bottom: var(--space-sm); }
.androidapp-upload .detail-label { width: auto; display: block; margin-bottom: 6px; }

.androidapp-upload-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}
.androidapp-upload-actions .modal-btn { min-height: 44px; }
.androidapp-progress {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.androidapp-history-list {
    list-style: none;
    margin: 0 0 var(--space-xs);
    padding: 0;
}
.androidapp-history-list li {
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-default);
    font-size: 0.85rem;
}
.androidapp-history-list li:last-child { border-bottom: 0; }
.androidapp-history-label { color: var(--text-primary); overflow-wrap: anywhere; }
.androidapp-history-meta { color: var(--text-muted); text-align: right; flex-shrink: 0; }

@media (max-width: 600px) {
    .androidapp-overlay { padding-top: 4vh; }
    .androidapp-modal { padding: var(--space-md); max-height: 92vh; }
    .androidapp-history-list li { flex-direction: column; gap: 2px; }
    .androidapp-history-meta { text-align: left; }
}
