/* 슬라이드 패널 스타일 */
:root {
    --panel-width: 450px;
    --panel-width-tablet: 400px;
    --panel-bg: #0f1023;
    --panel-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    --overlay-bg: rgba(0, 0, 0, 0.5);
    --primary-color: #60a5fa;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --border-radius: 12px;
    --transition-speed: 0.3s;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.08);
    --divider: rgba(255, 255, 255, 0.06);
}

/* 오버레이 배경 */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-bg);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease;
    z-index: 10999;
}

.panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 슬라이드 패널 컨테이너 */
.slide-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--panel-width);
    height: 100vh;
    background: var(--panel-bg);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--panel-shadow);
    transform: translateX(100%);
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 11000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.slide-panel.active {
    transform: translateX(0);
}

/* 패널 헤더 */
.panel-header {
    background: var(--primary-gradient);
    color: white;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header-icon {
    font-size: 1.5rem;
}

.panel-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.panel-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    transform: rotate(90deg);
}

/* 패널 탭 메뉴 */
.panel-tabs {
    display: flex;
    background: #12132a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 16px;
    gap: 8px;
    flex-shrink: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.panel-tabs::-webkit-scrollbar {
    display: none;
}

.panel-tab {
    background: transparent;
    border: none;
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-tab:hover {
    color: var(--primary-color);
    background: rgba(96, 165, 250, 0.08);
}

.panel-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.panel-tab-icon {
    font-size: 1.1rem;
}

/* 패널 컨텐츠 */
.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #0d0e1f;
}

.panel-content::-webkit-scrollbar {
    width: 8px;
}

.panel-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

.panel-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 탭 컨텐츠 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* 패널 액션 버튼 영역 */
.panel-actions {
    padding: 16px 24px;
    background: #12132a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.panel-action-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.panel-action-btn.primary {
    background: var(--primary-gradient);
    color: white;
}

.panel-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.panel-action-btn.secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.panel-action-btn.secondary:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.3);
    color: var(--primary-color);
}

/* 정보 카드 */
.info-card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--card-border);
}

.info-card-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card-content {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--divider);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* 점수 표시 */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

.score-badge.high {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.score-badge.medium {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
}

.score-badge.low {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
}

/* 로딩 상태 */
.panel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.panel-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.08);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

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

.panel-loading-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* 빈 상태 */
.panel-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}

.panel-empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.panel-empty-text {
    font-size: 1rem;
    color: var(--text-muted);
}

/* 실시간 정보 배지 */
.realtime-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.realtime-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

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

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .slide-panel {
        width: var(--panel-width-tablet);
    }
}

@media (max-width: 768px) {
    .slide-panel {
        width: 100vw;
    }
    
    .panel-header {
        padding: 16px 20px;
    }
    
    .panel-header h3 {
        font-size: 1.1rem;
    }
    
    .panel-content {
        padding: 12px;
    }
    
    .panel-actions {
        flex-direction: column;
    }
    
    .panel-action-btn {
        width: 100%;
    }
    
    /* ========== 장소 상세 패널 모바일 최적화 ========== */
    
    /* 로드뷰 높이 축소 */
    #panelRoadview {
        height: 150px !important;
    }
    
    /* 이미지 갤러리 2열 */
    .image-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    
    /* 편의시설 가로 스크롤 */
    #facilitiesContent > div:first-child {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 8px !important;
        -webkit-overflow-scrolling: touch;
    }
    
    #facilitiesContent > div:first-child::-webkit-scrollbar {
        display: none;
    }
    
    /* 섹션 패딩 및 마진 축소 */
    .place-detail-container > div {
        padding: 12px !important;
        margin-bottom: 12px !important;
    }
    
    .place-info-section,
    .transport-section,
    .facilities-section,
    .place-images-section,
    .place-blogs-section {
        border-radius: 8px !important;
    }
    
    /* 블로그 리뷰 터치 영역 확대 */
    .blog-review-item {
        padding: 14px !important;
        margin-bottom: 8px !important;
    }
    
    /* 편의시설 상세 목록 터치 영역 */
    #facilityDetailArea > div > div {
        padding: 12px 0 !important;
        min-height: 44px;
    }
    
    /* 로드뷰 섹션 */
    .roadview-section {
        margin-bottom: 12px !important;
    }
    
    .roadview-section h5 {
        font-size: 13px !important;
    }
}

/* 다크모드: 기본 테마가 다크이므로 별도 미디어쿼리 불필요 */
