﻿/* === Price Sidebar Ticker === */
.pf-sidebar-ticker {
    position: sticky;
    top: 100px; /* فاصله از هدر سایت */
    width: 100%;
    height: 403px;
    max-height: 403px;
    background: #121212;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    color: #f5f5f5;
    transition: all 0.3s ease;
    margin-left: auto;
    margin-right: auto;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.pf-sidebar-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* === Header (Tabs) === */
.pf-sidebar-card-header {
    background: linear-gradient(90deg, #1a1a1a 0%, #202020 100%);
    border-bottom: 1px solid #2b2b2b;
    padding: 10px 0;
    flex: 0 0 auto;
}

.pf-sidebar-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pf-sidebar-nav-item {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    color: #ccc;
    cursor: pointer;
    padding: 6px 0;
    transition: all 0.2s ease-in-out;
    border-bottom: 2px solid transparent;
}

    .pf-sidebar-nav-item:hover {
        color: #ffcc66;
    }

    .pf-sidebar-nav-item.active {
        color: #ffd700;
        font-weight: 600;
        border-bottom: 2px solid #d4af37;
    }

/* === Body === */
.pf-sidebar-card-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 12px;
    box-sizing: border-box;
}

    .pf-sidebar-card-body::-webkit-scrollbar {
        width: 6px;
    }

    .pf-sidebar-card-body::-webkit-scrollbar-thumb {
        background: #444;
        border-radius: 3px;
    }

.pf-sidebar-category-group {
    display: none;
}

    .pf-sidebar-category-group.active {
        display: block;
    }

/* === Items === */
.pf-sidebar-item-link {
    outline: none;
    position: relative;
    display: block;
    width: 100%;
    text-decoration: none;
    color: inherit;
    padding: 0.5rem;
    border-bottom: 1px solid white;
    overflow: hidden;
    line-height: 1.34rem;
}

    .pf-sidebar-item-link:hover {
        color: white;
    }

.pf-sidebar-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    box-sizing: border-box;
    overflow: hidden;
}

    .pf-sidebar-item:hover {
        background: #232323;
        border-color: #d4af37;
        transform: translateY(-2px);
    }

.pf-sidebar-item-title {
    float: none;
    text-align: right;
    flex: 1 1 auto;
    margin: 0;
    font-weight: 700;
    padding-right: 0.25rem;
    position: relative;
}

/* === Prices === */
.pf-sidebar-price-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 110px;
}

.pf-sidebar-price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 0.9rem;
}

.pf-sidebar-currency {
    font-size: 0.7rem;
    color: #999;
    margin-right: 2px;
}

/* === تغییر درصد === */
.pf-sidebar-item-change {
    flex: 0 0 auto;
    margin-left: 8px;
    font-size: 0.85rem;
}

    .pf-sidebar-item-change.pf-up {
        color: #00e676; /* مثبت */
    }

    .pf-sidebar-item-change.pf-down {
        color: #ff5252; /* منفی */
    }

    .pf-sidebar-item-change.pf-neutral {
        color: #aaa; /* بدون تغییر */
    }

/* === Hover glow === */
.pf-sidebar-item:hover .pf-sidebar-item-title {
    color: #ffd700;
}

/* === Smooth category switch === */
.pf-sidebar-category-group {
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
