/* 모바일 호가창 모달 스타일 */

/* 모바일에서만 적용 */
@media (max-width: 768px) {
    /* 기존 호가창 완전 숨김 */
    .orderbook-section {
        display: none !important;
        visibility: hidden !important;
        position: absolute !important;
        left: -9999px !important;
        top: -9999px !important;
    }
    
    /* 호가창 모달 */
    .orderbook-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 16px;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
    }
    
    .orderbook-modal.show {
        display: flex;
    }
    
    /* 모달 컨텐츠 */
    .orderbook-modal-content {
        width: 100%;
        max-width: 500px;
        max-height: 85vh;
        background: var(--bg-primary);
        border-radius: 16px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }
    
    /* 모달 헤더 */
    .orderbook-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
    }
    
    .orderbook-modal-title {
        font-size: 18px;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .orderbook-modal-close {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--bg-hover);
        border: none;
        border-radius: 8px;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .orderbook-modal-close:active {
        background: var(--border-light);
        transform: scale(0.95);
    }
    
    /* 모달 바디 */
    .orderbook-modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
    }
    
    /* 호가 컨테이너 */
    .orderbook-modal-body .orderbook {
        height: 100%;
    }
    
    .orderbook-modal-body .orderbook-content {
        padding: 0;
    }
    
    /* 매도/매수 섹션 스타일 */
    .orderbook-modal-body .orderbook-asks,
    .orderbook-modal-body .orderbook-bids {
        padding: 0;
        margin: 0;
    }
    
    .orderbook-modal-body .orderbook-asks-header,
    .orderbook-modal-body .orderbook-bids-header {
        padding: 12px 16px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 1;
    }
    
    .orderbook-modal-body .section-label {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-secondary);
    }
    
    .orderbook-modal-body .orderbook-grid-header {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 12px;
        font-size: 12px;
        color: var(--text-muted);
        margin-top: 8px;
    }
    
    /* 호가 아이템 */
    .orderbook-modal-body .orderbook-item {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 12px;
        padding: 12px 16px;
        border-bottom: 1px solid rgba(43, 49, 57, 0.3);
        cursor: pointer;
        transition: background 0.1s;
    }
    
    .orderbook-modal-body .orderbook-item:active {
        background: var(--bg-hover);
    }
    
    .orderbook-modal-body .orderbook-price {
        font-weight: 600;
        font-size: 14px;
    }
    
    .orderbook-modal-body .ask-price {
        color: var(--color-sell);
    }
    
    .orderbook-modal-body .bid-price {
        color: var(--color-buy);
    }
    
    .orderbook-modal-body .orderbook-quantity,
    .orderbook-modal-body .orderbook-total {
        text-align: right;
        color: var(--text-secondary);
        font-size: 13px;
    }
    
    /* 스크롤바 스타일 */
    .orderbook-modal-body::-webkit-scrollbar {
        width: 4px;
    }
    
    .orderbook-modal-body::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .orderbook-modal-body::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 2px;
    }
    
    /* 애니메이션 */
    .orderbook-modal.show .orderbook-modal-content {
        animation: modalSlideUp 0.3s ease-out;
    }
    
    @keyframes modalSlideUp {
        from {
            transform: translateY(100px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* PC에서는 모든 모바일 요소 숨김 */
@media (min-width: 769px) {
    .mobile-orderbook-btn,
    .orderbook-modal {
        display: none !important;
    }
}