﻿/* ============================================
   계좌 연동 모달 스타일
   ============================================ */

/* 모달 컨테이너 */
.broker-select-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

    /* 모달이 활성화될 때 */
    .broker-select-modal.active {
        display: flex;
    }

    /* 배경 오버레이 */
    .broker-select-modal .modal-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.6);
        cursor: pointer;
    }

    /* 모달 컨텐츠 박스 */
    .broker-select-modal .modal-content {
        position: relative;
        background: linear-gradient(135deg, #2d2d3d 0%, #1a1a2e 100%);
        border-radius: 16px;
        padding: 40px 32px;
        width: 90%;
        max-width: 560px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* 닫기 버튼 */
    .broker-select-modal .modal-close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        font-size: 32px;
        color: #ffffff;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        border-radius: 50%;
    }

        .broker-select-modal .modal-close:hover {
            background-color: rgba(255, 255, 255, 0.1);
            transform: rotate(90deg);
        }

    /* 모달 제목 */
    .broker-select-modal .modal-title {
        margin: 0 0 8px 0;
        font-size: 28px;
        font-weight: 700;
        color: #ffffff;
        text-align: left;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    /* 모달 부제목 */
    .broker-select-modal .modal-subtitle {
        margin: 0 0 32px 0;
        font-size: 14px;
        color: #a0a0a8;
        text-align: left;
        line-height: 1.5;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    /* 증권사 버튼 컨테이너 - 그리드 레이아웃 */
    .broker-select-modal .broker-buttons-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    /* 개별 증권사 버튼 */
    .broker-select-modal .broker-button {
        padding: 16px 12px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        border-radius: 8px;
        background-color: #3a3a4a;
        color: #ffffff;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    /* 기본 상태 */
    .broker-select-modal .broker-button {
        background-color: #3a3a4a;
    }

        /* 마우스 호버 효과 */
        .broker-select-modal .broker-button:hover {
            background-color: #4a4a5a;
            border-color: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
        }

        /* 마우스 클릭 효과 */
        .broker-select-modal .broker-button:active {
            transform: translateY(0);
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        }

        /* 키움증권 - 강조 색상 (빨강) */
        .broker-select-modal .broker-button.kiwoom {
            grid-column: 1 / -1;
            background: linear-gradient(135deg, #ff5757 0%, #ff3737 100%);
            border-color: #ff6b6b;
            color: #ffffff;
            font-weight: 700;
        }

            .broker-select-modal .broker-button.kiwoom:hover {
                background: linear-gradient(135deg, #ff6b6b 0%, #ff4747 100%);
                box-shadow: 0 12px 24px rgba(255, 87, 87, 0.3);
            }

        /* 나머지 증권사 버튼들 */
        .broker-select-modal .broker-button.yuanta,
        .broker-select-modal .broker-button.ls,
        .broker-select-modal .broker-button.miraeasset,
        .broker-select-modal .broker-button.daishin,
        .broker-select-modal .broker-button.sk,
        .broker-select-modal .broker-button.hana {
            background-color: #4a4a5a;
            border-color: rgba(255, 255, 255, 0.2);
        }

            .broker-select-modal .broker-button.yuanta:hover,
            .broker-select-modal .broker-button.ls:hover,
            .broker-select-modal .broker-button.miraeasset:hover,
            .broker-select-modal .broker-button.daishin:hover,
            .broker-select-modal .broker-button.sk:hover,
            .broker-select-modal .broker-button.hana:hover {
                background-color: #5a5a6a;
                border-color: rgba(255, 255, 255, 0.4);
            }

        /* 버튼 텍스트 */
        .broker-select-modal .broker-button .broker-name {
            display: block;
            text-align: center;
        }

/* ============================================
   주문 버튼 스타일
   ============================================ */

/* 계좌 연동 상태 버튼 */
.order-submit.account-link {
    background-color: #5a5a6a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .order-submit.account-link:hover {
        background-color: #6a6a7a;
        border-color: rgba(255, 255, 255, 0.4);
    }

/* 계좌 연동 완료 상태 버튼 */
.order-submit.account-linked {
    background-color: #4a9f68;
    border: 1px solid rgba(74, 159, 104, 0.5);
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .order-submit.account-linked:hover {
        background-color: #5aaf78;
        box-shadow: 0 4px 12px rgba(74, 159, 104, 0.3);
    }

/* ============================================
   반응형 디자인
   ============================================ */

@media (max-width: 600px) {
    .broker-select-modal .modal-content {
        width: 95%;
        padding: 32px 24px;
    }

    .broker-select-modal .modal-title {
        font-size: 24px;
    }

    .broker-select-modal .broker-buttons-container {
        gap: 10px;
    }

    .broker-select-modal .broker-button {
        padding: 14px 10px;
        font-size: 14px;
    }
}
