/**
 * 股价显示样式
 * 涨跌颜色和箭头控制
 */

/* 上涨样式 - 绿色向上箭头 */
.stock-up {
    color: #00a651 !important;
}

.icon--arrow-up.stock-up::before {
    content: '▲';
    color: #00a651;
    font-size: 1.2em;
    font-weight: bold;
}

/* 下跌样式 - 红色向下箭头 */
.stock-down {
    color: #e30613 !important;
}

.icon--arrow-down.stock-down::before {
    content: '▼';
    color: #e30613;
    font-size: 1.2em;
    font-weight: bold;
}

/* 确保箭头图标显示 */
.share-price-card__change-icon,
.masthead-share-price__change-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    vertical-align: middle;
}

/* 变化百分比颜色 */
.share-price-card__change-icon.stock-up ~ .share-price-card__change-percent,
.stock-up + .share-price-card__change-percent {
    color: #00a651;
}

.share-price-card__change-icon.stock-down ~ .share-price-card__change-percent,
.stock-down + .share-price-card__change-percent {
    color: #e30613;
}

/* 导航栏股价变化颜色 */
.masthead-share-price__change-icon.stock-up ~ .masthead-share-price__change,
.masthead-share-price__change-icon.stock-up + .masthead-share-price__change {
    color: #00a651;
}

.masthead-share-price__change-icon.stock-down ~ .masthead-share-price__change,
.masthead-share-price__change-icon.stock-down + .masthead-share-price__change {
    color: #e30613;
}

/* 导航栏百分比变化 */
.masthead-share-price__percentage-change {
    font-weight: bold;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .share-price-card__change-icon,
    .masthead-share-price__change-icon {
        width: 20px;
        height: 20px;
        line-height: 20px;
    }
    
    .icon--arrow-up.stock-up::before,
    .icon--arrow-down.stock-down::before {
        font-size: 1em;
    }
}

/* 动画效果 - 价格更新时 - 禁用避免抖动 */
@keyframes priceUpdate {
    0% {
        background-color: transparent;
    }
    100% {
        background-color: transparent;
    }
}

.share-price-card__price.updating,
.masthead-share-price__current.updating {
    animation: none;
    background-color: transparent;
}

/* 加载指示器 - 禁用动画避免抖动 */
.stock-loading {
    opacity: 0.6;
    position: relative;
}

.stock-loading::after {
    content: '...';
    position: absolute;
    right: -20px;
    animation: none;
}

