/* ============================================================
   mobile_app.css — 모바일 웹앱(Naver/Kakao 스타일) UI/UX 개선용
   ============================================================ */

/* 하단 탭 바 (Bottom Navigation Bar) */
.bottom-nav {
    display: none; /* PC에서는 숨김 */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #ffffff;
    border-top: 1px solid #ebebeb;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
    z-index: 1030;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom); /* iOS 대응 */
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888888;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    flex: 1;
    height: 100%;
    transition: color 0.2s;
}

.bottom-nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
}

.bottom-nav-item.active,
.bottom-nav-item:active {
    color: #356BB0; /* 도란타임 프라이머리 컬러 */
}
.bottom-nav-item.active i,
.bottom-nav-item:active i {
    color: #356BB0;
}

/* Offcanvas 메뉴 스타일링 */
.offcanvas-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px;
}
.offcanvas-body {
    padding: 0 20px;
}
.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f9f9f9;
    color: #333;
    font-size: 16px;
    text-decoration: none;
}
.mobile-menu-item i {
    font-size: 20px;
    margin-right: 15px;
    color: #888;
    width: 24px;
    text-align: center;
}
.mobile-menu-item:hover, .mobile-menu-item:active {
    color: #356BB0;
}
.mobile-menu-item:hover i, .mobile-menu-item:active i {
    color: #356BB0;
}
.mobile-login-box {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* 모바일 전용 반응형 적용 */
@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }
    body {
        /* 하단 탭바 높이만큼 여백 확보 */
        padding-bottom: 60px !important;
    }
    .footer {
        padding-bottom: 30px !important; 
    }
    
    /* PC 전용 헤더 로그인/가입 숨김 */
    .top-nav-links.desktop-only {
        display: none !important;
    }
    
    /* 모바일에서는 터치 영역 넓게 */
    .btn, .form-control, .form-select, .input-group-text {
        min-height: 48px;
    }
    
    /* 복잡한 푸터 정보 간소화 */
    .mobile-footer-compact {
        font-size: 11px !important;
        line-height: 1.4 !important;
    }
}

/* =========================================================
   ✅ PWA 앱 아이콘 설치 바 (헤더 아래, 모바일 전용)
   ========================================================= */
.pwa-install-bar {
	display: none;
	background: linear-gradient(135deg, #f0f6fb 0%, #e8f1f8 100%);
	border-bottom: 1px solid rgba(90,139,175,0.12);
	padding: 8px 16px;
	transform: translateY(-100%);
	opacity: 0;
	transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.pwa-install-bar.is-visible {
	display: block;
	transform: translateY(0);
	opacity: 1;
}
.pwa-install-bar-inner {
	max-width: 600px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
}
.pwa-install-bar-icon {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	flex-shrink: 0;
	box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.pwa-install-bar-text {
	flex: 1;
	min-width: 0;
	font-size: 0.82rem;
	color: #444;
	line-height: 1.35;
	letter-spacing: -0.01em;
}
.pwa-install-bar-text b {
	color: #2c3e50;
	font-weight: 600;
}
.pwa-install-bar-btn {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 14px;
	font-size: 0.78rem;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #356BB0 0%, #25508a 100%);
	border: none;
	border-radius: 18px;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: 0 2px 6px rgba(53,107,176,0.25);
	transition: all 0.2s ease;
	letter-spacing: 0.01em;
}
.pwa-install-bar-btn:active {
	transform: scale(0.96);
	box-shadow: 0 1px 3px rgba(53,107,176,0.2);
}
.pwa-install-bar-btn i {
	font-size: 0.72rem;
}
.pwa-install-bar-close {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	background: none;
	border: none;
	cursor: pointer;
	color: #aab;
	font-size: 0.7rem;
	border-radius: 50%;
	transition: all 0.15s;
	padding: 0;
}
.pwa-install-bar-close:active {
	background: rgba(0,0,0,0.06);
	color: #666;
}

/* PC에서 설치 바 숨김 */
@media (min-width: 768px) {
	.pwa-install-bar {
		display: none !important;
	}
}

/* 초소형 모바일 */
@media (max-width: 380px) {
	.pwa-install-bar {
		padding: 6px 10px;
	}
	.pwa-install-bar-inner {
		gap: 6px;
	}
	.pwa-install-bar-icon {
		width: 26px;
		height: 26px;
	}
	.pwa-install-bar-text {
		font-size: 0.76rem;
	}
	.pwa-install-bar-btn {
		padding: 5px 10px;
		font-size: 0.72rem;
	}
}

/* =========================================================
   ✅ PWA iOS 설치 가이드 (SweetAlert 내부)
   ========================================================= */
.pwa-ios-swal-popup {
	border-radius: 16px !important;
	padding: 20px 16px !important;
}
.pwa-ios-guide {
	text-align: center;
}
.pwa-ios-guide-header {
	margin-bottom: 18px;
}
.pwa-ios-guide-icon {
	width: 56px;
	height: 56px;
	border-radius: 14px;
	box-shadow: 0 3px 12px rgba(90,139,175,0.2);
	margin-bottom: 10px;
}
.pwa-ios-guide-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: #2c3e50;
	line-height: 1.3;
	margin-bottom: 4px;
}
.pwa-ios-guide-sub {
	font-size: 0.85rem;
	color: #7f8c97;
	line-height: 1.4;
}
.pwa-ios-guide-steps {
	text-align: left;
	margin: 0 auto 14px;
	max-width: 280px;
}
.pwa-ios-guide-step {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid #f0f2f5;
}
.pwa-ios-guide-step:last-child {
	border-bottom: none;
}
.pwa-ios-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	background: linear-gradient(135deg, #356BB0, #25508a);
	color: #fff;
	border-radius: 50%;
	font-size: 0.78rem;
	font-weight: 700;
	flex-shrink: 0;
	line-height: 1;
}
.pwa-ios-step-text {
	font-size: 0.88rem;
	color: #444;
	line-height: 1.5;
}
.pwa-ios-step-text b {
	color: #2c3e50;
	font-weight: 600;
}
.pwa-ios-guide-note {
	font-size: 0.8rem;
	color: #7f8c97;
	padding: 10px 14px;
	background: #f8f9fb;
	border-radius: 10px;
	margin-top: 4px;
	line-height: 1.4;
}
