/**
 * Sticky Results Widget
 * Fixed bottom-right widget showing key metrics
 */

.sticky-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    background: #ffffff;
    border: 1px solid var(--uk-border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    transition: all 0.3s ease;
    overflow: hidden;
}

.sticky-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--uk-primary);
    color: #ffffff;
    cursor: pointer;
    user-select: none;
}

.sticky-title {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.sticky-toggle {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sticky-widget.sticky-collapsed .sticky-toggle {
    transform: rotate(-180deg);
}

.sticky-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.sticky-widget.sticky-collapsed .sticky-body {
    max-height: 0;
    padding: 0 16px;
    overflow: hidden;
}

.sticky-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--uk-border);
}

.sticky-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sticky-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--uk-muted);
}

.sticky-value-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sticky-value {
    font-size: 16px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--uk-text);
}

.sticky-arrow {
    font-size: 18px;
    min-width: 22px;
    text-align: center;
}

.sticky-arrow.positive {
    /* Green thumbs up emoji is already green, no need for color */
}

.sticky-arrow.positive::before {
    content: "👍";
}

.sticky-arrow.negative {
    /* Red thumbs down emoji is already red, no need for color */
}

.sticky-arrow.negative::before {
    content: "👎";
}

.sticky-widget.sticky-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
}

/* Hide on mobile and small tablets */
@media (max-width: 768px) {
    .sticky-widget {
        display: none;
    }
}
