/* 모바일 레이아웃 스타일 */

/* 메인 컨테이너 */
#container {
    width: 100%;
    min-height: calc(100vh - 120px);
    background: #fff;
}

/* 컨텐츠 영역 */
.content_area {
    width: 100%;
    padding: 0;
    background: #fff;
}

/* 모바일 푸터 */
#mobile_ft {
    background: #2c3e50;
    color: #fff;
    padding: 30px 20px;
    margin-top: 40px;
}

.mobile_ft_wrap {
    max-width: 100%;
}

.ft_info {
    font-size: 13px;
    line-height: 1.8;
    color: #b0b8c1;
}

.ft_info strong {
    color: #fff;
    font-weight: 600;
}

.ft_copyright {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: #8897a8;
}

/* 모바일 메뉴 오버레이 */
.mobile_menu_overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile_menu_overlay.active {
    display: block;
    opacity: 1;
}

/* 스크롤 잠금 (메뉴 열릴 때) */
body.menu_open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* 반응형 이미지 */
.responsive_img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 모바일 최적화 테이블 */
.mobile_table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile_table table {
    min-width: 100%;
    border-collapse: collapse;
}

/* 로딩 인디케이터 */
.loading_spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1a9ba8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 에러 메시지 */
.error_msg {
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 14px;
    margin: 15px;
}

.success_msg {
    padding: 15px;
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 4px;
    color: #155724;
    font-size: 14px;
    margin: 15px;
}

/* 빈 상태 */
.empty_state {
    padding: 60px 20px;
    text-align: center;
}

.empty_state_icon {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 15px;
}

.empty_state_text {
    font-size: 15px;
    color: #999;
}

/* 모바일 버튼 */
.mobile_btn {
    display: inline-block;
    padding: 12px 20px;
    background: #1a9ba8;
    color: #fff;
    text-align: center;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.mobile_btn:active {
    background: #158894;
    transform: scale(0.98);
}

.mobile_btn.btn_outline {
    background: #fff;
    color: #1a9ba8;
    border: 1px solid #1a9ba8;
}

.mobile_btn.btn_outline:active {
    background: #f0f8f9;
}

.mobile_btn.btn_block {
    display: block;
    width: 100%;
}

/* 모바일 카드 */
.mobile_card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 15px;
}

.mobile_card_header {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

.mobile_card_body {
    padding: 15px;
}

/* 모바일 리스트 */
.mobile_list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile_list_item {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.mobile_list_item:last-child {
    border-bottom: none;
}

/* 모바일 그리드 */
.mobile_grid {
    display: grid;
    gap: 15px;
}

.mobile_grid.col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mobile_grid.col-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* 안전 영역 (노치 대응) */
@supports (padding: max(0px)) {
    body.mobile-body {
        padding-top: max(120px, env(safe-area-inset-top) + 120px);
    }
    
    #mobile_hd {
        padding-top: env(safe-area-inset-top);
    }
    
    #mobile_ft {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 가로 모드 */
@media (orientation: landscape) and (max-height: 500px) {
    body.mobile-body {
        padding-top: 60px;
    }
    
    #mobile_hd {
        height: auto;
        min-height: 60px;
    }
}

/* 태블릿 */
@media (min-width: 768px) {
    .content_area {
        max-width: 768px;
        margin: 0 auto;
    }
    
    #mobile_ft {
        padding: 40px 30px;
    }
}
