/* Strip all box styling from the sidebar wrapper */
.sidebar-area {
    flex: 0 0 320px !important;
    width: 320px !important;
    max-width: 320px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.sidebar-section-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text-main);    /* Ensures it changes in dark mode */
    text-transform: uppercase;  /* Standard "sidebar label" look */
    letter-spacing: 0.06em;
    margin-bottom: var(--space-3);        /* Space before the cards start */
    padding-left: 10px;
    border-left: 3px solid var(--primary); /* The blue vertical accent line[cite: 1] */
    display: block;             /* Ensures it takes its own line */
}

.sidebar-section-title:not(:first-of-type) { margin-top: 32px; }

/* Sidebar Compact Card Styling */
.sidebar-area .tool-card {
    display: flex; /* Force horizontal layout */
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    background: var(--surface); /* Keeps the "card" feel */
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: var(--space-3);
    text-decoration: none; /* Remove underline from link */
    transition: transform 0.2s, border-color 0.2s;
}

/* Hover effect for better UX */
.sidebar-area .tool-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

/* Fix icon size in the sidebar */
.sidebar-area .tool-card svg {
    width: 24px;   /* Smaller, fixed size for sidebar */
    height: 24px;
    flex-shrink: 0;
    color: var(--primary);
    margin-left: 10px;
}

/* Fix text size in the sidebar */
.sidebar-area .tool-card h3 {
    margin-left: 5px;
    font-size: 0.9rem; /* Slightly smaller font for sidebar */
    font-weight: 500;
    color: var(--text-main);
}

.sidebar-list .tool-card p {
    /*margin: 0;*/
    margin-left: 5px;
    color: var(--text-muted); /* Force theme muted color */
    font-size: 0.8rem;
}

.sidebar-ad-slot {
    width: 300px; /* Force the exact rigid width of your 300x250 Adsterra asset */
    height: 250px;
    min-height: 250px;
    margin: 0 auto; /* Keeps the ad perfectly centered in the sidebar */
    
    /* THE FIX: Changed to transparent so the theme background peeks through */
    background: transparent !important; 
    
    border-radius: var(--radius-xl); /* Perfectly matches your calculator card curves */
    border: 1px solid var(--border); /* Matches the premium solid border look of your tools */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04); /* Matching soft depth shadow */
    display: none; /* flex */
    align-items: center;
    justify-content: center;
    overflow: hidden;          
    box-sizing: border-box;
}

/* 5. Mobile Override - Matched exactly to your 768px core breakpoint */
@media (max-width: 768px) {
    .sidebar-area {
        width: 100% !important;
        max-width: 100% !important;
        position: static;
    }
    
    /* Completely drops the sidebar ad container on mobile viewports */
    .sidebar-ad-slot {
        display: none !important;
    }
}