php-adb/assets/app.css
2026-12-03 20:44:30 -05:00

240 lines
5.5 KiB
CSS

/* Scoped additions on top of the shared stylesheet */
.no-margin-top { margin-top: 0 !important; }
.wrap-actions { flex-wrap: wrap; }
.hero-card {
background: linear-gradient(180deg, rgba(79, 163, 255, 0.06), transparent 60%);
}
.status-pill {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
border: 1px solid var(--line);
border-radius: 999px;
font-size: .8rem;
color: var(--muted);
white-space: nowrap;
transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.status-pill.is-ok {
color: var(--success);
border-color: rgba(123, 220, 162, .45);
background: rgba(123, 220, 162, .06);
}
.status-pill.is-bad {
color: var(--urgent);
border-color: rgba(239, 101, 101, .45);
background: rgba(239, 101, 101, .06);
}
.status-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: currentColor;
box-shadow: 0 0 0 0 currentColor;
}
.status-pill.is-ok .status-dot,
.status-pill.is-bad .status-dot {
animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
0%, 100% { box-shadow: 0 0 0 0 rgba(127,127,127,0); opacity: 1; }
50% { box-shadow: 0 0 0 5px rgba(127,127,127,0.12); opacity: .8; }
}
.control-columns {
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
align-items: start;
}
.first-section { margin-top: 0 !important; }
.nav-header { margin-bottom: 10px; }
.connect-toggle { min-width: 108px; }
.device-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 12px;
min-height: 72px;
}
.device-grid-compact {
grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
gap: 10px;
}
.device-grid-compact .device-card {
padding: 10px 12px;
gap: 6px;
}
.device-grid-compact .device-name {
font-size: .88rem;
}
.device-grid-compact .device-ip {
font-size: .74rem;
}
.device-grid-compact .device-meta .badge {
font-size: .65rem;
padding: 1px 6px;
}
.device-card {
display: flex;
flex-direction: column;
gap: 8px;
padding: 14px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: transparent;
cursor: pointer;
text-align: left;
width: 100%;
transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
animation: card-in .28s ease both;
}
.device-card:hover {
transform: translateY(-2px);
border-color: rgba(79, 163, 255, .5);
background: var(--hover);
}
.device-card:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
.device-card.is-selected {
border-color: var(--accent);
background: rgba(79, 163, 255, .08);
box-shadow: inset 0 0 0 1px rgba(79, 163, 255, .25);
}
.device-card.is-offline {
opacity: .72;
}
.device-card.is-offline:hover { opacity: 1; }
@keyframes card-in {
from { opacity: 0; transform: translateY(8px) scale(.985); }
to { opacity: 1; transform: translateY(0) scale(1); }
}
.device-top {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 10px;
}
.device-name {
font-weight: 600;
font-size: .95rem;
line-height: 1.3;
overflow-wrap: anywhere;
}
.device-ip {
font-family: var(--mono);
font-size: .8rem;
color: var(--muted);
}
.device-meta {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: auto;
}
.badge.is-open {
color: var(--success);
border-color: rgba(123, 220, 162, .45);
}
.badge.is-closed {
color: var(--muted);
}
.badge.is-adb {
color: var(--accent);
border-color: rgba(79, 163, 255, .45);
}
.remote-section { margin-top: 16px; }
.remote-section .section-title { margin-bottom: 8px; }
.remote-grid {
display: grid;
grid-template-columns: repeat(3, 64px);
gap: 8px;
justify-content: start;
}
.remote-btn {
min-height: 52px;
font-size: 1rem;
padding: 0;
user-select: none;
transition: transform .08s ease, border-color .15s ease, background .15s ease;
}
.remote-btn:active,
.remote-btn.is-pressed {
transform: scale(.96);
}
.remote-btn.sent {
border-color: var(--success);
color: var(--success);
}
.command-log-details { margin-top: 16px; }
.command-log {
margin: 0;
max-height: 220px;
overflow: auto;
font-size: .78rem;
line-height: 1.5;
white-space: pre-wrap;
word-break: break-word;
}
#scanAlert, #commandAlert { margin-bottom: 12px; }
.is-loading {
position: relative;
pointer-events: none;
opacity: .7;
}
.is-loading::after {
content: "";
width: 14px;
height: 14px;
border: 2px solid currentColor;
border-right-color: transparent;
border-radius: 50%;
display: inline-block;
animation: spin .7s linear infinite;
margin-left: 2px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) {
.control-columns { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
.hero-card h1 { font-size: 1.6rem; }
.status-pill { white-space: normal; font-size: .75rem; }
.remote-grid { grid-template-columns: repeat(3, minmax(56px, 72px)); justify-content: center; }
.device-grid-compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.nav-header { gap: 8px; }
.connect-toggle { min-width: 0; }
.command-log { max-height: 180px; }
}
@media (max-width: 420px) {
.device-grid-compact { grid-template-columns: 1fr 1fr; }
.remote-grid { grid-template-columns: repeat(3, minmax(52px, 1fr)); width: 100%; max-width: 240px; margin-inline: auto; }
.remote-btn { min-height: 48px; }
.actions { gap: 7px; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}