/* Smart NOTAM 스타일시트 */

/* 전체 레이아웃 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* 네비게이션 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* 카드 스타일 */
.card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

/* NOTAM 텍스트 색상 스타일 (참조 파일에서 가져온 기능) */
.notam-text span[style*="color: red"] {
    background-color: rgba(220, 53, 69, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

.notam-text span[style*="color: blue"] {
    background-color: rgba(13, 110, 253, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* NOTAM 우선순위 스타일 */
.priority-high {
    border-left: 4px solid #dc3545;
}

.priority-medium {
    border-left: 4px solid #ffc107;
}

.priority-low {
    border-left: 4px solid #198754;
}
}

.card:hover {
    transform: translateY(-2px);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border-bottom: none;
    font-weight: 600;
}

/* 업로드 영역 */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.upload-area:hover {
    border-color: #0d6efd;
    background-color: #f8f9ff;
}

.upload-area.dragover {
    border-color: #0d6efd;
    background-color: #e3f2fd;
}

/* NOTAM 아이템 */
.notam-item {
    transition: all 0.3s ease;
}

.notam-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.notam-item .card-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

/* 뱃지 스타일 */
.badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.badge-priority-high {
    background-color: #dc3545;
}

.badge-priority-medium {
    background-color: #fd7e14;
}

.badge-priority-low {
    background-color: #198754;
}

/* 버튼 스타일 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #198754 0%, #157347 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #f0ad4e 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
}

/* 필터 패널 */
.filter-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* 지도 컨테이너 */
#map {
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 로딩 상태 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
}

/* 텍스트 애니메이션 */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    #map {
        height: 300px !important;
    }
}

/* 에러 상태 */
.error-message {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #f1aeb5;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

/* 성공 상태 */
.success-message {
    background: linear-gradient(135deg, #d1edff 0%, #b8e6ff 100%);
    border: 1px solid #9fccfa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

/* 정보 박스 */
.info-box {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffdf7e;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

/* 프로그레스 바 */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e9ecef;
}

.progress-bar {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 4px;
}

/* 모달 스타일 */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 15px 15px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 15px 15px;
}

/* 툴팁 스타일 */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: #333;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 테이블 스타일 */
.table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table thead {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* 아이콘 애니메이션 */
.fa-spin-custom {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 알림 스타일 */
.alert {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.alert-dismissible .btn-close {
    padding: 1rem;
}

/* 폼 요소 스타일 */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: translateY(-1px);
}

/* 체크박스 스타일 */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* 푸터 스타일 */
footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
}

/* 코드 블록 스타일 */
.code-block {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 인라인 코드 스타일 */
code {
    background-color: #f8f9fa;
    color: #e83e8c;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* 번역 텍스트 스타일 개선 */
.translation-text {
    text-align: left !important;
    white-space: normal !important;
    word-wrap: break-word;
    line-height: 1.7;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 6px;
    margin: 8px 0;
}

/* 한국어 번역 텍스트 특별 스타일 */
.korean-translation .translation-text {
    font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
    letter-spacing: -0.02em;
    line-height: 1.0;
}

/* 한국어 번역 구조화된 섹션 스타일 */
.korean-translation .translation-text h3,
.korean-translation .translation-text h4,
.korean-translation .translation-text strong {
    color: #0d6efd;
    font-weight: 600;
    margin: 0;
    display: block;
}

/* 한국어 번역 불릿 포인트 스타일 */
.korean-translation .translation-text ul {
    margin: 0;
    padding-left: 20px;
}

.korean-translation .translation-text li {
    margin: 0;
    line-height: 1.0;
}

/* 한국어 번역 굵은 텍스트 스타일 */
.korean-translation .translation-text strong {
    color: #198754;
    font-weight: 700;
    background-color: rgba(25, 135, 84, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
}

/* 탭 컨텐츠 내부 텍스트 정렬 */
.tab-content .translation-text {
    text-align: left;
    margin-left: 0;
    padding-left: 0;
}

/* 통합 요약 섹션 스타일 */
.notam-summary-item {
    border-left: 3px solid #e9ecef;
    padding-left: 15px;
    margin-bottom: 20px;
}

.notam-summary-item h6 {
    margin-bottom: 10px;
    font-weight: 600;
}

.summary-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

/* 개별 NOTAM 번역 섹션 스타일 */
.notam-item .translation-text {
    border: 1px solid #e9ecef;
    background-color: #f8f9fa !important;
}

/* 탭 네비게이션 강화 */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    font-weight: 500;
    color: #495057;
}

.nav-tabs .nav-link.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

/* 필터링 상태 스타일 */
.notam-summary-item[style*="display: none"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notam-summary-item {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* 필터링 메시지 스타일 */
#summaryFilterStatus {
    display: block;
    margin-top: 5px;
    font-style: italic;
}

/* 시간 필터 버튼 스타일 */
#applyFilterBtn {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

#applyFilterBtn:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #0d47a1 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

#resetFilterBtn {
    border: 2px solid #6c757d;
    background: transparent;
    color: #6c757d;
    font-weight: 600;
    transition: all 0.3s ease;
}

#resetFilterBtn:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
}

/* 시간 필터 입력 그룹 스타일 */
.time-filter-controls {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    min-height: 120px; /* 최소 높이 설정으로 레이아웃 안정화 */
}

.time-filter-controls .form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease;
}

.time-filter-controls .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 시간 필터 입력창 전환 애니메이션 */
#timeFilterInputs {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

#timeFilterInputs[style*="display: none"] {
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
}

#timeFilterInputs:not([style*="display: none"]) {
    opacity: 1;
    max-height: 200px;
}

/* 줄바꿈 유지 스타일 */
.preserve-linebreaks {
    white-space: pre-line !important;
    word-wrap: break-word;
    line-height: 1.0;
}

/* 한국어 번역 마크다운 스타일 개선 */
.korean-translation .translation-text {
    /* 마크다운 스타일을 HTML로 변환하여 적용 */
}

.korean-translation .translation-text p {
    margin: 0;
    line-height: 1.0;
    display: block;
}

.korean-translation .translation-text br {
    display: block;
    margin: 0;
    content: "";
}

/* 한국어 번역 섹션 헤더 스타일 */
.korean-translation .translation-text h1,
.korean-translation .translation-text h2,
.korean-translation .translation-text h3,
.korean-translation .translation-text h4 {
    color: #0d6efd;
    font-weight: 600;
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* 한국어 번역 강조 텍스트 */
.korean-translation .translation-text em {
    font-style: normal;
    color: #198754;
    font-weight: 600;
}

/* 한국어 번역 코드/용어 스타일 */
.korean-translation .translation-text code {
    background-color: #f8f9fa;
    color: #e83e8c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

/* 반응형 개선 */
@media (max-width: 768px) {
    .time-filter-controls {
        padding: 15px;
        min-height: auto;
    }
    
    .time-filter-controls .row {
        margin: 0;
    }
    
    .time-filter-controls .col-md-2 {
        margin-bottom: 15px;
    }
}