/* ================================================================
   HostMon Dashboard — Animations & OS Icons
   ================================================================ */

/* ---- Card entrance ---- */
@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.host-card {
    animation: card-in 0.35s ease-out backwards;
}
.host-card:nth-child(1) { animation-delay: 0.00s; }
.host-card:nth-child(2) { animation-delay: 0.04s; }
.host-card:nth-child(3) { animation-delay: 0.08s; }
.host-card:nth-child(4) { animation-delay: 0.12s; }
.host-card:nth-child(5) { animation-delay: 0.16s; }
.host-card:nth-child(6) { animation-delay: 0.20s; }
.host-card:nth-child(7) { animation-delay: 0.24s; }
.host-card:nth-child(8) { animation-delay: 0.28s; }

/* ---- Tab transition ---- */
@keyframes tab-fade-in {
    from { opacity: 0; transform: translateX(-6px); }
    to   { opacity: 1; transform: translateX(0); }
}
.tab-pane.active {
    animation: tab-fade-in 0.2s ease-out;
}

/* ---- Online pulse ---- */
@keyframes online-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.35); }
    50%      { box-shadow: 0 0 0 6px rgba(63, 185, 80, 0); }
}
.status-badge.online::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 5px;
    background: var(--green);
    animation: online-pulse 2s ease-in-out infinite;
}

/* ---- Usage bar fill animation ---- */
.usage-fill {
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Skeleton loading ---- */
@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.12; }
    50%      { opacity: 0.22; }
}
.skeleton {
    display: block;
    background: var(--text-muted);
    border-radius: var(--radius-xs);
    animation: skeleton-pulse 1.8s ease-in-out infinite;
}

/* ---- OS Icons ---- */
.os-icon {
    height: 16px;
    width: auto;
    display: inline-block;
    vertical-align: -3px;
    margin-right: 5px;
    flex-shrink: 0;
}

/* ---- Quick Actions bar ---- */
.quick-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.vps-topbar .quick-actions {
    padding: 0;
    border: none;
    margin: 0;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.quick-action-btn:hover {
    border-color: var(--accent);
    color: var(--text);
    background: rgba(88, 166, 255, 0.08);
}

.quick-action-btn.destructive {
    border-color: rgba(248, 81, 73, 0.3);
    color: var(--red);
}

.quick-action-btn.destructive:hover {
    border-color: var(--red);
    background: rgba(248, 81, 73, 0.1);
}

/* ---- OS info on host card ---- */
.host-os-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(139, 148, 158, 0.1);
    font-size: 0.6rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
}

/* ---- OS override selector ---- */
.os-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 3px 24px 3px 8px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238b949e' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    transition: border-color 0.15s;
}
.os-select:hover { border-color: var(--accent); }
.os-select:focus { outline: none; border-color: var(--accent); }
