/* App-like bottom navigation (global) */

.soso-sp-app-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--soso-vv-bottom, 0px);
    z-index: 999999;
    display: none;
    gap: 8px;
    align-items: stretch;
    justify-content: space-around;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    background: rgba(248, 250, 252, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(226, 232, 240, 1);
}

.soso-sp-app-nav__item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    border: 0;
    background: transparent;
    color: #64748b;
    text-decoration: none;
    font-size: 12px;
    line-height: 1.1;
    cursor: pointer;
}

.soso-sp-app-nav__item:hover {
    color: #334155;
}

.soso-sp-app-nav__item .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
}

.soso-sp-app-nav__text {
    font-weight: 800;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

/* Favorites modal (used by bottom nav) */
.soso-sp-fav-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1000001;
}

.soso-sp-fav-modal.is-open {
    display: block;
}

.soso-sp-fav-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.soso-sp-fav-modal__dialog {
    position: relative;
    width: min(560px, calc(100vw - 24px));
    margin: 10vh auto;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.25);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 18px 18px 16px;
    color: #0f172a;
}

.soso-sp-fav-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #334155;
}

.soso-sp-fav-modal__title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 900;
}

.soso-sp-fav-modal__desc {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #64748b;
}

.soso-sp-fav-empty {
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
}

.soso-sp-fav-list {
    display: grid;
    gap: 10px;
}

.soso-sp-fav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    text-decoration: none;
    color: #0f172a;
}

.soso-sp-fav-item__logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
}

.soso-sp-fav-item__logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.soso-sp-fav-item__meta {
    min-width: 0;
    flex: 1 1 auto;
}

.soso-sp-fav-item__name {
    font-weight: 800;
    font-size: 14px;
    line-height: 1.25;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.soso-sp-fav-item__type {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #64748b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .soso-sp-app-nav {
        display: flex;
    }

    html.has-soso-app-nav:not(.has-soso-app-nav--profile) body {
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    }
}
