﻿/* 浮動按鈕樣式 */
.bet-order-floating-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 1001;
    user-select: none;
}

    .bet-order-floating-btn .btn-icon {
        font-size: 28px;
        line-height: 1;
    }

    .bet-order-floating-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }

    .bet-order-floating-btn i {
        font-size: 24px;
    }

    .bet-order-floating-btn .badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #dc3545;
        border-radius: 10px;
        padding: 2px 6px;
        font-size: 12px;
    }

/* 提示視窗樣式 */
.tooltip-popup {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

    .tooltip-popup.show {
        opacity: 1;
    }

    .tooltip-popup::after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border: 8px solid transparent;
        border-top-color: rgba(0, 0, 0, 0.9);
    }

/* 動畫效果 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.bet-order-floating-btn.bounce {
    animation: bounce 0.6s ease;
}

@keyframes flash {
    0%, 50%, 100% {
        opacity: 1;
    }

    25%, 75% {
        opacity: 0.5;
    }
}

.bet-order-floating-btn.flash {
    animation: flash 0.6s ease;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .bet-order-floating-btn {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
    }

        .bet-order-floating-btn i {
            font-size: 22px;
        }

    .tooltip-popup {
        bottom: 60px;
        font-size: 14px;
    }
}

/* Modal 樣式 */
#betOrderModal .modal-dialog {
    max-width: 800px;
}

#betOrderModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

/* Modal 暗色主題 */
#betOrderModal .modal-content {
    background-color: #1a1a1a;
    color: #e0e0e0;
    border: 1px solid #333;
}

#betOrderModal .modal-header {
    background-color: #252525;
    border-bottom: 1px solid #333;
}

    #betOrderModal .modal-header .modal-title {
        color: #fff;
    }

    #betOrderModal .modal-header .btn-close {
        filter: invert(1);
    }

/* 頁籤樣式 */
#betOrderModal .nav-tabs {
    border-bottom: 1px solid #333;
}

    #betOrderModal .nav-tabs .nav-link {
        color: #999;
        border-color: transparent;
        background-color: transparent;
    }

        #betOrderModal .nav-tabs .nav-link:hover {
            color: #fff;
            border-color: #333 #333 transparent;
            background-color: #2a2a2a;
        }

        #betOrderModal .nav-tabs .nav-link.active {
            color: #fff;
            background-color: #2a2a2a;
            border-color: #333 #333 transparent;
        }

/* Accordion 暗色樣式 */
#betOrderModal .accordion-item {
    background-color: #252525;
    border: 1px solid #333;
    color: #e0e0e0;
}

#betOrderModal .accordion-button {
    background-color: #252525;
    color: #e0e0e0;
}

    #betOrderModal .accordion-button:not(.collapsed) {
        background-color: #2a2a2a;
        color: #fff;
    }

    #betOrderModal .accordion-button::after {
        filter: invert(1);
    }

    #betOrderModal .accordion-button:focus {
        box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
        border-color: #667eea;
    }

#betOrderModal .accordion-body {
    background-color: #1f1f1f;
    border-top: 1px solid #333;
}

/* 訂單詳情樣式 */
#betOrderModal .order-details {
    color: #e0e0e0;
}

#betOrderModal .text-muted {
    color: #999 !important;
}

/* 選號項目樣式調整 */
#betOrderModal .selection-item {
    opacity: 0.9;
}

    #betOrderModal .selection-item.win {
        opacity: 1;
        box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
    }

/* 開獎號碼側邊顯示 */
#betOrderModal .draw-numbers-side {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
}

    #betOrderModal .draw-numbers-side h6 {
        color: #ccc;
    }

/* 警告和資訊框 */
#betOrderModal .alert-info {
    background-color: #1e3a5f;
    color: #8bb4e7;
    border-color: #2d4a73;
}

#betOrderModal .alert-warning {
    background-color: #5a4020;
    color: #e7c08b;
    border-color: #73522d;
}

#betOrderModal .alert-danger {
    background-color: #5f1e1e;
    color: #e78b8b;
    border-color: #732d2d;
}

/* 徽章樣式 */
#betOrderModal .badge.bg-secondary {
    background-color: #495057 !important;
}

#betOrderModal .badge.bg-danger {
    background-color: #dc3545 !important;
}

/* 文字顏色調整 */
#betOrderModal .text-success {
    color: #4caf50 !important;
}

#betOrderModal .text-danger {
    color: #f44336 !important;
}

#betOrderModal .text-warning {
    color: #ff9800 !important;
}

/* 捲軸樣式 */
#betOrderModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#betOrderModal .modal-body::-webkit-scrollbar-track {
    background: #1a1a1a;
}

#betOrderModal .modal-body::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

    #betOrderModal .modal-body::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

/* 載入動畫 */
#betOrderModal .spinner-border {
    color: #667eea;
}

/* 訂單項目樣式 */
.accordion-button {
    padding: 1rem;
}

    .accordion-button:not(.collapsed) {
        background-color: #f8f9fa;
    }

/* 訂單詳情布局 */
.order-details {
    display: flex;
    gap: 20px;
    position: relative;
}

.order-details-content {
    flex: 1;
}

.position-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.position-label {
    width: 80px;
    font-weight: 500;
    color: #495057;
}

.selected-items {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.selection-item {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

    .selection-item.big-small {
        background: #e3f2fd;
        color: #1976d2;
    }

    .selection-item.odd-even {
        background: #fce4ec;
        color: #c2185b;
    }

    .selection-item.number {
        background: #f3e5f5;
        color: #7b1fa2;
    }

    .selection-item.other {
        background: #e8f5e9;
        color: #388e3c;
    }

    .selection-item.win {
        background: #4caf50;
        color: white;
        position: relative;
    }

        .selection-item.win::after {
            content: '✓';
            margin-left: 0.25rem;
        }

/* 開獎號碼樣式 */
.draw-numbers {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.draw-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .bet-order-floating-btn {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
    }

        .bet-order-floating-btn i {
            font-size: 20px;
        }

    #betOrderModal .modal-dialog {
        margin: 0.5rem;
    }
}

/* 載入動畫 */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* 捲軸樣式 */
#betOrderModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#betOrderModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#betOrderModal .modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

    #betOrderModal .modal-body::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

/* 開獎號碼角落顯示 */
.order-details {
    position: relative;
    padding-right: 180px; /* 為開獎號碼預留空間 */
}

.draw-numbers-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.draw-number-small {
    width: 30px;
    height: 30px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 響應式調整 */
@media (max-width: 768px) {
    .order-details {
        padding-right: 0;
        padding-top: 50px; /* 改為上方顯示 */
    }

    .draw-numbers-corner {
        top: 5px;
        right: 5px;
    }

    .draw-number-small {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
}

/* 開獎號碼側邊顯示 - 改為水平排列 */
.draw-numbers-side {
    flex-shrink: 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 8px;
    min-width: 280px;
}

    .draw-numbers-side h6 {
        font-size: 0.85rem;
        color: #999;
        margin-bottom: 8px;
        font-weight: normal;
    }

/* 開獎號碼水平排列 */
.draw-numbers-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

/* 選號水平排列 */
.selected-numbers-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

    /* 選號項目 - 調整大小以對齊 */
    .selected-numbers-horizontal .selection-item {
        width: 35px;
        height: 35px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        font-size: 0.9rem;
        font-weight: 500;
    }

/* 空位樣式 */
.selection-item.empty {
    background: rgba(255, 255, 255, 0.1);
    color: #666;
    border: 1px dashed #444;
}

/* 保持原有的選號樣式 */
.selection-item.big-small {
    background: #1976d2;
    color: white;
}

.selection-item.odd-even {
    background: #7b1fa2;
    color: white;
}

.selection-item.number {
    background: #388e3c;
    color: white;
}

/* 中獎樣式 */
.selection-item.win {
    background: #4caf50 !important;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.6);
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* 響應式調整 */
@media (max-width: 768px) {
    .order-details {
        flex-direction: column;
    }

    .draw-numbers-side {
        width: 100%;
        margin-top: 15px;
        min-width: auto;
    }

    .draw-numbers-horizontal,
    .selected-numbers-horizontal {
        justify-content: center;
    }

        .draw-number-small,
        .selected-numbers-horizontal .selection-item {
            width: 30px;
            height: 30px;
            font-size: 0.85rem;
        }
}

.draw-number-small {
    width: 35px;
    height: 35px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}



/* 選號詳情樣式保持不變 */
.selection-display h6 {
    color: #495057;
    font-weight: 600;
}

/* 響應式調整 */
@media (max-width: 768px) {
    .order-details {
        flex-direction: column;
    }

    .draw-numbers-side {
        width: 100%;
        margin-top: 15px;
    }

    .draw-numbers-vertical {
        justify-content: center;
    }

    .draw-number-small {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
}

.draw-numbers-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}