.power {
    display: contents;
}

.power-bar-widget {
    gap: 0.3333rem;
    white-space: nowrap;
}

.power-panel {
    position: fixed;
    z-index: 150;
    width: 31.6667rem;
    max-width: calc(var(--viewport-w) - 16px);
    max-height: calc(var(--viewport-h) - var(--bar-height) - 10px);
    overflow-y: auto;
    padding: 1.6667rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.1667rem;
    background: var(--color-background);
    border: var(--border-width) solid var(--color-accent);
    border-radius: var(--radius);
    color: var(--color-foreground);
    font-family: var(--font-mono);
}

html[data-bar-position="left"] .power-panel,
html[data-bar-position="right"] .power-panel {
    max-height: calc(var(--viewport-h) - 10px);
}

html[data-bar-position="top"] .power-panel {
    top: calc(var(--bar-height) + 5px);
    right: 5px;
}

html[data-bar-position="bottom"] .power-panel {
    bottom: calc(var(--bar-height) + 5px);
    right: 5px;
}

html[data-bar-position="left"] .power-panel {
    left: calc(var(--bar-size-vertical) + 5px);
    bottom: 5px;
}

html[data-bar-position="right"] .power-panel {
    right: calc(var(--bar-size-vertical) + 5px);
    bottom: 5px;
}

.power-hero {
    display: flex;
    align-items: center;
    gap: 1.1667rem;
}

.power-hero-icon {
    font-size: 2.3333rem;
    line-height: 1;
}

.power-hero-labels {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1667rem;
}

.power-hero-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.power-hero-status {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: color-mix(in srgb, var(--color-foreground) 70%, transparent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 180ms ease-out;
}

.power-status-fading {
    opacity: 0;
}

.power-hero-percent {
    font-size: 2.8333rem;
    font-weight: 700;
    line-height: 1;
}

.power-track {
    height: 0.6667rem;
    border-radius: 0.3333rem;
    background: color-mix(in srgb, var(--color-foreground) 12%, transparent);
    overflow: hidden;
}

.power-fill {
    height: 100%;
    border-radius: 0.3333rem;
    background: var(--color-foreground);
    transition: width 320ms ease-out;
}

.power-fill-charging {
    animation: power-pulse 1.9s ease-in-out infinite;
}

@keyframes power-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.power-stats {
    display: flex;
    gap: 1.6667rem;
}

.power-stats-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4167rem;
}

.power-pair {
    display: flex;
    justify-content: space-between;
    gap: 0.6667rem;
    font-size: 0.8333rem;
}

.power-pair-label {
    color: color-mix(in srgb, var(--color-foreground) 60%, transparent);
    white-space: nowrap;
}

.power-pair-value {
    white-space: nowrap;
}
