/**
 * TFP Sidebar Styles
 */

#tfp-sidebar {
    display: flex;
    flex-direction: column;

    /* Fixed Floating Sidebar */
    position: fixed;
    /* Top: Topbar Gap (8) + Topbar Height (56) + Gap (8) = 72px */
    top: calc(8px + var(--tfp-topbar-height) + 8px);
    bottom: 8px;
    /* Reduced gap */
    left: 8px;
    /* Reduced gap */
    width: var(--tfp-sidebar-width);
    z-index: 900;

    /* Glassmorphic Style */
    background: rgba(255, 255, 255, 0.4);
    /* Consistent alpha */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    /* Reduced radius */

    /* Thin Glass Border */
    border: 1px solid #ddd;
    /* box-shadow removed */

    padding: 24px 0;
    /* Vertical padding inside the card */
    overflow: hidden;
    /* For rounded corners */
}

/* ============================================
   Brand Logo
   ============================================ */
.brand {
    padding: 0 16px 24px 16px;
    text-align: center;
}

.brand-logo-img {
    max-width: 64px;
    /* Adjust based on new logo size */
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ============================================
   Primary navigation (semantic list + links)
   ============================================ */
.main-nav {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 10px;
}

.tfp-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: transparent;
}

.tfp-nav-item {
    margin: 0 12px 2px 12px;
    border-radius: 28px;
    padding: 0;
}

.tfp-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 28px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface-variant);
    background: transparent;
    box-sizing: border-box;
    width: 100%;
    font: inherit;
    cursor: pointer;
}

.tfp-nav-link:hover {
    background: color-mix(in srgb, var(--md-sys-color-on-surface) 8%, transparent);
}

.tfp-nav-link:focus-visible {
    outline: 2px solid var(--md-sys-color-primary, #6750a4);
    outline-offset: 2px;
}

.tfp-nav-item.active-item .tfp-nav-link {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.tfp-nav-icon {
    flex-shrink: 0;
    color: var(--md-sys-color-on-surface-variant);
    --md-icon-size: 24px;
}

.tfp-nav-item.active-item .tfp-nav-icon {
    color: var(--md-sys-color-on-secondary-container);
}

.tfp-nav-label {
    text-align: center;
    flex: 1;
    width: 100%;
}

/* ============================================
   Promo Block (Sticky Bottom)
   ============================================ */
.sidebar-promo {
    margin-top: auto;
    padding: 16px 16px 0 16px;
    opacity: 0.95;
}

.sidebar-promo .promo-card + .promo-card {
    margin-top: 12px;
}

.promo-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: var(--md-sys-color-on-surface);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

/* Tech/Music Decoration */
.promo-card::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, var(--md-sys-color-primary-container) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.5;
}

.promo-card h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface);
}

.promo-card p {
    margin: 0 0 16px 0;
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.4;
}

.promo-btn {
    width: 100%;
    --md-filled-button-container-color: #f47c31;
    --md-filled-button-label-text-color: #fff;
}

/* ============================================
   Social Links
   ============================================ */
.sidebar-social {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    /* Space under social icons */
}

.sidebar-social md-icon-button {
    --md-icon-button-state-layer-height: 32px;
    --md-icon-button-state-layer-width: 32px;
    --md-icon-button-icon-size: 20px;
    padding: 4px;
    /* Reduced visual padding area */
    color: var(--md-sys-color-on-surface-variant);
}

.sidebar-social i {
    font-size: 20px;
    display: flex;
    /* Ensure centering inside slot */
}

/* Hide Sidebar on Mobile */
@media (max-width: 768px) {
    #tfp-sidebar {
        display: none !important;
    }
}