/* ===== ILP 통합 검색 전용 스타일시트 ===== */

/* === 기본 레이아웃 === */
.integrated-search-page {
    padding: 1rem 0;
}

/* === 검색 헤더 === */
.search-header {
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.75rem;
    color: white;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.search-stats {
    text-align: right;
}

/* === 검색 폼 === */
.search-form-container .card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.75rem;
}

.search-form-container .input-group-lg .form-control {
    border-radius: 0.5rem 0 0 0.5rem;
    border: 2px solid #dee2e6;
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

.search-form-container .input-group-lg .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.search-form-container .btn {
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.search-form-container .form-select-lg {
    border: 2px solid #dee2e6;
    border-radius: 0.5rem;
    font-size: 1.1rem;
}

.advanced-search-options {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

/* === 검색 진행률 === */
#searchProgress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: #e9ecef;
}

#searchProgress .progress-bar {
    border-radius: 0.25rem;
    background: linear-gradient(90deg, #0d6efd, #6610f2);
}

/* === 요약 카드 스타일 === */
.search-summary-cards {
    margin-bottom: 2rem;
}

.summary-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

.summary-card .card {
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.summary-card .card-header {
    border-bottom: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.summary-card .card-body {
    padding: 1.25rem;
}

/* === 미리보기 아이템 === */
.preview-items {
    min-height: 120px;
    max-height: 180px;
    overflow-y: auto;
}

.preview-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-item:hover {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    margin: 0 -0.5rem;
    padding: 0.75rem 0.5rem;
}

.preview-item h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.preview-item p {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.preview-item small {
    font-size: 0.75rem;
    color: #6c757d;
}

.preview-item .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

/* === 데이터 타입 배지 === */
.datatype-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 0.375rem;
}

.datatype-p { background-color: #0d6efd; color: white; }
.datatype-kipris { background-color: #0dcaf0; color: #000; }
.datatype-s { background-color: #198754; color: white; }
.datatype-r { background-color: #ffc107; color: #000; }
.datatype-h { background-color: #6c757d; color: white; }

/* === 뷰 컨트롤 === */
.view-controls {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
}

.view-toggle .btn {
    border-radius: 0;
    border-color: #0d6efd;
    color: #0d6efd;
}

.view-toggle .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.view-toggle .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

.view-toggle .btn-check:checked + .btn {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* === 기술 카드 (카드 뷰) === */
.technology-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.technology-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

.technology-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.25rem;
}

.technology-card .card-body {
    padding: 1.25rem;
}

.technology-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: #212529;
}

.technology-card .card-text {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.technology-card .technology-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

.technology-card .technology-meta small {
    display: block;
    margin-bottom: 0.25rem;
}

.technology-card .card-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 0.75rem 1.25rem;
}

.technology-card .card-actions {
    display: flex;
    gap: 0.5rem;
}

.technology-card .card-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 0.25rem;
}

/* === 리스트 뷰 컨테이너 === */
#listViewContainer {
    /* 기본적으로 JavaScript로 제어 */
}

#listViewContainer.show {
    display: block !important;
}

#listViewContainer .list-group {
    /* Bootstrap의 list-group 기본 스타일 유지 */
}

#cardViewContainer.hide {
    display: none !important;
}

/* === 리스트 아이템 (리스트 뷰) === */
.technology-list-item {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

.technology-list-item:hover {
    background-color: #f8f9fa;
    border-color: #0d6efd;
    box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.1);
}

.technology-list-item h6 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.technology-list-item p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.technology-list-item small {
    font-size: 0.8rem;
    color: #6c757d;
}

.technology-list-item .btn-group-vertical .btn {
    margin-bottom: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
}

/* === 검색 하이라이팅 === */
.search-highlight {
    background-color: #fff3cd;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-weight: 600;
    color: #856404;
}

/* === 로딩 상태 === */
.loading-spinner {
    display: none;
}

.loading-spinner.active {
    display: inline-block;
}

#resultsLoading {
    padding: 3rem 0;
    text-align: center;
}

#resultsLoading .spinner-border {
    width: 3rem;
    height: 3rem;
}

#infiniteLoadingIndicator {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
}

/* === 결과 정보 === */
.result-info {
    font-size: 0.9rem;
    color: #6c757d;
}

/* === 페이지네이션 === */
.pagination {
    justify-content: center;
}

.pagination .page-link {
    border-radius: 0.375rem;
    margin: 0 0.125rem;
    color: #0d6efd;
    border-color: #dee2e6;
}

.pagination .page-link:hover {
    background-color: #e7f1ff;
    border-color: #0d6efd;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* === 빈 결과 상태 === */
#noResultsSection {
    padding: 4rem 0;
    color: #6c757d;
}

#noResultsSection i {
    opacity: 0.5;
}

/* === 반응형 디자인 === */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .search-form-container .input-group {
        flex-direction: column;
    }
    
    .search-form-container .btn {
        border-radius: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .view-controls .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .view-controls .col-md-6 {
        text-align: center;
    }
    
    .technology-card .card-actions {
        flex-direction: column;
    }
    
    .technology-list-item .row {
        flex-direction: column;
    }
    
    .technology-list-item .btn-group-vertical {
        flex-direction: row;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .summary-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .integrated-search-page {
        padding: 0.5rem 0;
    }
    
    .search-header {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .summary-card .card-body {
        padding: 1rem;
    }
    
    .preview-items {
        min-height: 100px;
        max-height: 150px;
    }
    
    .technology-card .card-body {
        padding: 1rem;
    }
    
    .technology-card .card-footer {
        padding: 0.75rem 1rem;
    }
}

/* === 애니메이션 === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

/* === 접근성 === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 포커스 스타일 */
.summary-card:focus,
.technology-card:focus,
.technology-list-item:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .summary-card .card {
        border: 2px solid #000;
    }
    
    .technology-card {
        border: 2px solid #000;
    }
    
    .search-highlight {
        background-color: #ffff00;
        color: #000;
    }
}

/* 다크모드 스타일 제거됨 */

/* === 프린트 스타일 === */
@media print {
    .search-form-container,
    .view-controls,
    #paginationContainer,
    .card-actions,
    .btn,
    .search-header {
        display: none !important;
    }
    
    .technology-card,
    .technology-list-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #dee2e6;
        margin-bottom: 0.5rem;
    }
    
    .search-highlight {
        background-color: transparent;
        text-decoration: underline;
        font-weight: bold;
    }
    
    .page-title {
        font-size: 1.5rem;
        color: #000;
        margin-bottom: 1rem;
    }
}

/* === 추가 유틸리티 클래스 === */
.text-subtle {
    color: #718096;
}

.bg-subtle {
    background-color: #f8fafc;
}

.border-subtle {
    border-color: #e8eef2 !important;
}

.shadow-subtle {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.shadow-medium {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.shadow-large {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* 부드러운 전환 효과 */
.transition-all {
    transition: all 0.2s ease;
}

.transition-colors {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.transition-transform {
    transition: transform 0.2s ease;
}

/* 호버 효과 */
.hover-lift:hover {
    transform: translateY(-2px);
}

.hover-grow:hover {
    transform: scale(1.02);
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Firefox 스크롤바 */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f1f5f8;
}
