/* ========================================
   Search Modal Component CSS
   ======================================== */
/* 용도: 종목 검색 기능 모달 */
/* 의존성: Font Awesome (fa-search, fa-times, fa-lightbulb) */
/* 버전: 20251105001 */

/* 애니메이션 정의 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100vh);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 모달 오버레이 */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1350; /* 뉴스 패널보다 높은 z-index */
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.search-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 모달 컨텐츠 */
.search-modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

/* 모달 헤더 */
.search-modal-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.search-modal-header h3 i {
    margin-right: 10px;
    color: #28a745;
}

/* 닫기 버튼 */
.close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* 모달 본문 */
.search-modal-body {
    padding: 30px 25px;
}

/* 검색 박스 */
.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
}

/* 검색 입력 필드 */
#searchInput {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
    background: #ffffff;
}

#searchInput::placeholder {
    color: #999;
    font-size: 14px;
}

/* 검색 버튼 */
#searchButton {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

#searchButton:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

#searchButton:active {
    transform: translateY(0);
}

/* 검색 팁 영역 */
.search-tips {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 20px;
}

.search-tips p {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.search-tips p i {
    color: #ffc107;
    margin-right: 8px;
}

.search-tips ul {
    margin: 0;
    padding-left: 20px;
    list-style: none;
}

.search-tips li {
    position: relative;
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 6px;
}

.search-tips li:before {
    content: "•";
    color: #28a745;
    font-weight: bold;
    position: absolute;
    left: -15px;
}

/* 반응형 디자인 (모바일) */
@media (max-width: 768px) {
    .search-modal-content {
        width: 95%;
        margin: 20px;
    }

    .search-modal-header {
        padding: 15px 20px;
    }

    .search-modal-header h3 {
        font-size: 18px;
    }

    .search-modal-body {
        padding: 20px;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    #searchInput {
        font-size: 16px; /* iOS 줌 방지 */
    }

    #searchButton {
        width: 100%;
        justify-content: center;
    }
}
