/*
 * Canlı Borsa Bileşeni Stilleri
 * Modül: canli-borsa-bileseni
 */

.canli-borsa-marquee {
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    /* Arka plan ve metin renkleri (Varsayılan beyaz/koyu gri) */
    background: var(--cb-bg, #ffffff);
    color: var(--cb-text, #333333);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 28px;
    /* Yükseklik ayarı */
    line-height: 28px;
    user-select: none;
    -webkit-user-select: none;
    margin-left: 18px;
    /* Sol boşluk (oklar için) */
    border-left: 1px solid #e5e7eb;
}

/* Kontrol Okları Stilleri */
.cb-controls {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    width: 18px;
    /* Reduced width */
    height: 28px;
    /* Match widget height */
    /* border-right removed */
}

.cb-arrow-btn {
    flex: 1;
    background: transparent;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s;
    line-height: 1;
    padding-left: 3px;
    /* Smaller arrow appearance */
}

.cb-arrow-btn:hover {
    background: transparent;
    transform: scale(1.1);
}

.cb-arrow-btn:active {
    background: transparent;
    transform: scale(0.9);
}

/* SVG İkon Stilleri */
.cb-arrow-svg {
    width: 100%;
    height: 100%;
    fill: #1e73be;
    /* Blue color */
    display: block;
}

.cb-arrow-btn:hover .cb-arrow-svg {
    fill: #005177;
    /* Darker blue on hover */
}

/* Oklar arası boşluk */
.cb-arrow-right {
    margin-bottom: 0;
}

.cb-arrow-left {
    margin-top: 0;
}

.ticker-track {
    display: inline-block;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    margin-right: 2rem;
    will-change: transform;
    /* Hint browser */
}

.ticker-item .label {
    margin: 0;
    opacity: .9;
}

.ticker-item .label::after {
    content: ":";
    margin-right: 4px;
}

.ticker-item .price {
    margin: 0;
    font-weight: 700;
}

.sym-icon {
    margin-right: 4px;
}

.trend-icon {
    margin-left: 2px;
    font-size: 0.9em;
}

/* Trend Renkleri ve Animasyonlar */
.ticker-item.trend-up .price,
.ticker-item.trend-up .trend-icon {
    color: #16a34a;
}

.ticker-item.trend-up .trend-icon {
    animation: trendUpAnim 1s ease-in-out infinite alternate;
}

.ticker-item.trend-down .price,
.ticker-item.trend-down .trend-icon {
    color: #dc2626;
}

.ticker-item.trend-down .trend-icon {
    animation: trendDownAnim 1s ease-in-out infinite alternate;
}

.ticker-item .trend-icon.fa-minus {
    color: #6b7280;
    opacity: 0.7;
}

/* Sembol renkleri */
.sym-usd .sym-icon {
    color: #16a34a;
}

.sym-eur .sym-icon {
    color: #2563eb;
}

.sym-bist .sym-icon {
    color: #f97316;
}

.sym-brent .sym-icon {
    color: #374151;
}

.sym-eurusd .sym-icon {
    color: #7c3aed;
}

@keyframes trendUpAnim {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-2px);
    }
}

@keyframes trendDownAnim {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(2px);
    }
}

/* İmleç ve Sürükleme Durumu */
.canli-borsa-marquee {
    cursor: grab;
}

.canli-borsa-marquee.is-dragging {
    cursor: grabbing !important;
    user-select: none;
    /* Crucial for preventing selection */
}

.canli-borsa-marquee * {
    user-select: none;
    /* Ensure children don't get selected either during drag */
}


/* -------------------------------------------------------------------------- */
/* Dikey Bileşen Stilleri                                                     */
/* -------------------------------------------------------------------------- */
.canli-borsa-vertical-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.canli-borsa-vertical-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cb-vertical-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
    font-size: 14px;
}

.cb-vertical-item:last-child {
    border-bottom: none;
}

.cb-vertical-item:hover {
    background-color: #f9fafb;
}

.cb-v-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #374151;
}

.cb-v-left .sym-icon {
    width: 20px;
    /* Sabit genişlik */
    text-align: center;
}

.cb-v-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.cb-v-right .price {
    color: #111827;
}

.cb-v-right .change {
    font-size: 0.9em;
}

/* Trend Colors for Vertical */
.cb-vertical-item.trend-up .price,
.cb-vertical-item.trend-up .change {
    color: #16a34a;
}

.cb-vertical-item.trend-down .price,
.cb-vertical-item.trend-down .change {
    color: #dc2626;
}

/* Görünürlük Ayarları */
@media (max-width: 767px) {
    .gizle-mobil {
        display: none !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .gizle-tablet {
        display: none !important;
    }
}

@media (min-width: 1025px) {
    .gizle-masaustu {
        display: none !important;
    }
}

/* Dikey Modül Mobil Uyumluluk */
@media (max-width: 480px) {
    .cb-vertical-item {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Kullanıcı Tanımlı Düzeltmeler */
.canli-borsa-widget-wrapper {
    padding: 5px !important;
}