/* ==========================================================================
   SOLON — Header, Footer & Navigation
   ========================================================================== */

/* ---- Topbar ---- */
.solon-topbar {
    position: sticky;
    top: 0;
    z-index: var(--z-nav);
    background: rgba(13, 17, 23, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    height: 60px;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Logo */
.solon-logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 1.4rem;
    line-height: 1;
    filter: drop-shadow(0 0 6px rgba(201, 162, 39, 0.5));
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, #e6edf3, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Desktop nav */
.topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}

.topbar-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
}

.topbar-link:hover,
.topbar-link.active {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.topbar-link.active {
    color: var(--primary);
}

/* Azioni destra */
.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Notifiche icon btn */
.topbar-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition);
    font-size: 1.1rem;
}

.topbar-icon-btn:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* Badge notifiche */
.notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--error);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    animation: pulse 2s infinite;
}

/* Avatar button */
.topbar-avatar-btn {
    background: none;
    border: 2px solid var(--border);
    border-radius: 50%;
    padding: 1px;
    cursor: pointer;
    transition: border-color var(--transition);
    display: flex;
    align-items: center;
}

.topbar-avatar-btn:hover {
    border-color: var(--primary);
}

.topbar-avatar-btn::after {
    display: none; /* rimuovi chevron Bootstrap */
}

/* ---- Dropdown ---- */
.solon-dropdown {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    min-width: 220px;
}

.solon-dropdown .dropdown-header {
    color: var(--text-primary);
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

.solon-dropdown .dropdown-item {
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    transition: all var(--transition);
    display: flex;
    align-items: center;
}

.solon-dropdown .dropdown-item:hover {
    background: var(--bg-page);
    color: var(--text-primary);
}

.solon-dropdown .dropdown-item.text-error { color: var(--error); }
.solon-dropdown .dropdown-item.text-error:hover { background: rgba(248, 81, 73, 0.1); }

.solon-dropdown .dropdown-divider { border-color: var(--border-light); }

/* ---- Bottom Nav — sempre visibile (app-like) ---- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    background: rgba(22, 27, 34, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 64px;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1.3rem;
    padding: 0 12px;
    height: 100%;
    transition: color var(--transition);
    flex: 1;
}

.bottom-nav-item small {
    font-size: 0.65rem;
    font-weight: 500;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary);
}

/* FAB upload (solo expert) */
.upload-fab {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(26, 108, 245, 0.4);
    transition: transform var(--transition), box-shadow var(--transition);
}

.bottom-nav-item:hover .upload-fab {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(26, 108, 245, 0.5);
}

/* Badge mobile */
.notif-badge-mobile {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
}

/* ---- Footer desktop ---- */
.solon-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-light);
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.solon-footer a {
    color: var(--text-muted);
    transition: color var(--transition);
}

.solon-footer a:hover { color: var(--text-primary); }

/* ==========================================================================
   Layout globale — padding per bottom nav fisso
   ========================================================================== */

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
}

/* Padding-bottom globale: il contenuto non viene nascosto sotto il bottom nav */
main {
    padding-bottom: 80px;
}

/* Su schermi larghi, il bottom nav si allarga al centro con una larghezza max */
@media (min-width: 900px) {
    .bottom-nav {
        max-width: 600px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        border-left: 1px solid var(--border-light);
        border-right: 1px solid var(--border-light);
    }
}