.bitycle-crypto-container {
    display: flex;
    height: 700px;
    overflow: hidden;
    position: relative;
    flex-direction: column;
}

.crypto-sidebar {
    width: 260px;
    background: #fff;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-header {
    padding: 16px;
    border-bottom: 1px solid #f1f1f1;
}

.crypto-search-input {
    width: 85%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    color: #303030;
    font-size: 14px;
}

.crypto-search-input:focus {
    outline: none;
    border-color: #DCE8E5;
}

.crypto-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* هر آیتم: یک wrapper کلیک‌خور که ویجت ticker بایتیکل را در خود دارد */
.crypto-ticker-item {
    position: relative;
    width: 228px;
    min-height: 65px;
    height: 65px;
    overflow: hidden;
    margin: 0 auto;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.crypto-ticker-item:hover {
    background: #f6f8f8;
}

.crypto-ticker-item.active {
    background: #f0f6f4;
    border-color: #DCE8E5;
}

.crypto-ticker-item > div[id^="bitycle-ticker-"] {
    width: 228px !important;
    height: 76px;
    transform: scale(0.85);
    transform-origin: top right; /* چیدمان RTL */
}

/* لایه‌ی شفاف روی ویجت برای گرفتن کلیک (ویجت داخل iframe است) */
.crypto-ticker-clicklayer {
    position: absolute;
    inset: 0;
    z-index: 5;
}

/* placeholder قبل از لود شدن ویجت (lazy-load) */
.crypto-ticker-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 228px;
    height: 76px;
    color: #a3a5a8;
    font-size: 14px;
    background: #fafafa;
    border-radius: 8px;
}

/* بخش چارت */
.crypto-main-content {
    position: relative;
}

/* ==================== دراپ داون موبایل ==================== */
.crypto-mobile-select-wrapper {
    display: none;
    position: relative;
    width: 100%;
    padding: 10px 12px;
    box-sizing: border-box;
    background: #f1f1f1;
    direction: rtl;
}

.crypto-mobile-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;

    border-radius: 12px;
    padding: 10px 14px;
    cursor: pointer;
    color: #111;
    font-size: 15px;
    font-family: inherit;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    transition: background 0.2s;
}

.crypto-mobile-btn:focus {
    outline: none;
}

.crypto-mobile-btn-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.crypto-mobile-btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.crypto-mobile-btn-icon-placeholder {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f7931a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    font-weight: bold;
    flex-shrink: 0;
}

.crypto-mobile-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.crypto-mobile-btn-namefa {
    font-size: 14px;
    color: #fff;
    font-weight: 600;
    line-height: 1;
}

.crypto-mobile-btn-symbol {
    font-size: 11px;
    color: #888;
    line-height: 1;
    direction: ltr;
    text-align: left;
}

.crypto-mobile-chevron {
    color: #888;
    font-size: 12px;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.crypto-mobile-chevron.open {
    transform: rotate(180deg);
}

/* لیست dropdown */
.crypto-mobile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% - 10px);
    right: 12px;
    left: 12px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    direction: rtl;
}

.crypto-mobile-dropdown.open {
    display: block;
}

.crypto-mobile-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    color: #fff;
    font-size: 14px;
    transition: background 0.15s;
    border-bottom: 1px solid #222;
}

.crypto-mobile-option:last-child {
    border-bottom: none;
}

.crypto-mobile-option:hover,
.crypto-mobile-option.active {
    background: #242424;
}

.crypto-mobile-option-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.crypto-mobile-option-icon-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    flex-shrink: 0;
}

.crypto-mobile-option-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.crypto-mobile-option-namefa {
    font-size: 13px;
    color: #fff;
    font-weight: 500;
    line-height: 1;
}

.crypto-mobile-option-symbol {
    font-size: 11px;
    color: #666;
    line-height: 1;
    direction: ltr;
    text-align: left;
}

/* ==================== موبایل ==================== */
@media (max-width: 992px) {
    .bitycle-crypto-container {
        height: auto;
        min-height: 650px;
        background: #111;
    }

    /* سایدبار دسکتاپ مخفی می‌شود */
    .crypto-sidebar {
        display: none;
    }

    /* dropdown موبایل نمایش داده می‌شود */
    .crypto-mobile-select-wrapper {
        display: block;
    }

    .crypto-main-content {
        background: #111;
        display: block;
        width: 100%;
        height: 650px;
    }
}

/* دسکتاپ */
@media (min-width: 993px) {
    .crypto-main-content {
        flex: 1;
    }
    .crypto-mobile-select-wrapper {
        display: none;
    }
    
    .bitycle-crypto-container {
        flex-direction: row;
    }
    
    .crypto-sidebar {
        display: flex;
    }
}
