/* ========================================
   Diamond City - Mobile Browser / App View
   Loaded only when device is detected as mobile
======================================== */

body.is-mobile-app {
    padding-bottom: 70px;
    background: #f0f2f5;
    -webkit-tap-highlight-color: transparent;
}

/* ===== Logo - Centered & Scalable ===== */
body.is-mobile-app .site-header {
    padding: 14px 0 10px;
    background: #fff;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

body.is-mobile-app .main-logo {
    max-height: 52px;
    max-width: 170px;
    width: auto;
    object-fit: contain;
}

/* ===== Banner - App style ===== */
body.is-mobile-app .banner-section {
    padding: 12px 12px 8px;
    background: transparent;
}

body.is-mobile-app .banner-inner {
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    overflow: hidden;
}

body.is-mobile-app .banner-img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    object-position: center top;
}

/* ===== Social Buttons ===== */
body.is-mobile-app .social-btns-section {
    padding: 16px 16px 8px;
}

body.is-mobile-app .social-btns-wrap {
    max-width: 100%;
    gap: 12px;
}

body.is-mobile-app .btn-facebook,
body.is-mobile-app .btn-social-explore {
    width: 100%;
    min-height: 50px;
    font-size: 0.95rem;
    border-radius: 12px; /* slightly less rounded for app feel */
}

/* ===== Branches - Two Columns tight ===== */
body.is-mobile-app .branches-section {
    padding: 12px 12px 90px;
}

body.is-mobile-app .branch-card {
    padding: 18px 14px;
    border-radius: 12px;
    border-top-width: 3px;
}

body.is-mobile-app .branch-title {
    font-size: 1.1rem;
}

body.is-mobile-app .branch-subtitle {
    font-size: 0.8rem;
}

body.is-mobile-app .branch-info p {
    font-size: 0.88rem;
    margin-bottom: 12px;
}

/* ===== Footer ===== */
body.is-mobile-app .site-footer {
    padding: 14px 12px;
    font-size: 0.8rem;
}

/* ===== FIXED BOTTOM BAR ===== */
body.is-mobile-app .mobile-bottom-bar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #ffffff;
    border-top: 1px solid #e0e0e0;
    box-shadow: 0 -3px 16px rgba(0,0,0,0.08);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding: 0 2px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

body.is-mobile-app .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 0.62rem;
    font-weight: 500;
    text-align: center;
    padding: 6px 2px;
    gap: 4px;
    min-width: 0;
}

body.is-mobile-app .bottom-nav-item i {
    font-size: 1.3rem;
    color: #1a1a4e;
    line-height: 1;
}

body.is-mobile-app .bottom-nav-item span {
    line-height: 1.15;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.is-mobile-app .bottom-nav-item:active {
    color: #6B2D8B;
}

body.is-mobile-app .bottom-nav-item:active i {
    color: #6B2D8B;
}

/* Safe area for iPhone notch / home indicator */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    body.is-mobile-app .mobile-bottom-bar {
        height: calc(64px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    body.is-mobile-app {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
}

/* Very small screens */
@media (max-width: 360px) {
    body.is-mobile-app .main-logo {
        max-height: 44px;
        max-width: 150px;
    }
    
    body.is-mobile-app .banner-img {
        max-height: 160px;
    }
    
    body.is-mobile-app .bottom-nav-item {
        font-size: 0.58rem;
    }
    
    body.is-mobile-app .bottom-nav-item i {
        font-size: 1.15rem;
    }
}
