/**
 * app-layout.css
 * Extracted from resources/views/layouts/app.blade.php
 *
 * Contains:
 *  - Base body styles
 *  - Legacy new-posts-banner suppression
 *  - Mobile bottom navigation bar
 *  - Mobile explore sheet
 */

/* ── Base Body ── */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding-top: 0;
}

/* Globally suppress legacy "new posts" banner from any cached HTML */
.new-posts-banner { display: none !important; }

/* ── Mobile Bottom Navigation ── */
.mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050;
    display: flex; align-items: center; justify-content: space-around;
    height: 60px; padding-bottom: env(safe-area-inset-bottom, 0);
    background: var(--card-bg, #fff);
    border-top: 1px solid var(--border-color, #e5e7eb);
    box-shadow: 0 -2px 10px rgba(0,0,0,.08);
}
.mobile-bottom-nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 1; gap: 2px; padding: 6px 0; position: relative;
    color: var(--text-secondary, #6b7280); text-decoration: none;
    font-size: 0.6rem; font-weight: 500; border: none; background: none; cursor: pointer;
    transition: color .15s;
}
.mobile-bottom-nav-item i { font-size: 1.15rem; }
.mobile-bottom-nav-item.active { color: var(--primary-color, #3b82f6); }
.mobile-bottom-nav-item:hover { color: var(--primary-color, #3b82f6); text-decoration: none; }
/* iOS Safari: <button> elements need explicit sizing to respect flex: 1 */
button.mobile-bottom-nav-item {
    min-width: 0;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}
.mobile-bottom-badge {
    position: absolute; top: 2px; right: 50%; transform: translateX(14px);
    background: #ef4444; color: #fff; font-size: 0.5rem; font-weight: 700;
    min-width: 16px; height: 16px; line-height: 16px; text-align: center;
    border-radius: 99px; padding: 0 4px;
}

/* ── Mobile Explore Sheet ── */
.mobile-explore-sheet-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1060;
}
.mobile-explore-sheet-content {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1061;
    background: var(--card-bg, #fff); border-radius: 16px 16px 0 0;
    padding: 12px 16px calc(70px + env(safe-area-inset-bottom, 0)) 16px;
    max-height: 70vh; overflow-y: auto;
    animation: slideUpSheet .25s ease-out;
}
@keyframes slideUpSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }
.mobile-explore-sheet-handle {
    width: 36px; height: 4px; background: var(--border-color, #d1d5db);
    border-radius: 99px; margin: 0 auto 12px;
}
.mobile-explore-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.mobile-explore-item {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    text-decoration: none; color: var(--text-primary, #1f2937);
    font-size: 0.68rem; font-weight: 500; text-align: center;
}
.mobile-explore-item:hover { text-decoration: none; color: var(--primary-color, #3b82f6); }
.mobile-explore-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; position: relative;
}
.mobile-explore-badge {
    position: absolute; top: -4px; right: -4px;
    background: #ef4444; color: #fff; font-size: 0.5rem; font-weight: 700;
    min-width: 16px; height: 16px; line-height: 16px; text-align: center;
    border-radius: 99px; padding: 0 3px;
}

/* Push main content above bottom nav on mobile */
@media (max-width: 991.98px) {
    body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0)); }
}
