/* Sidebar Styles for BanglaDateToday.com */

/* Main Layout Structure */
.main-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .main-layout {
        flex-direction: row;
        gap: 2rem;
    }
}

/* Main Content Area */
.main-content {
    flex: 1;
    min-width: 0; /* Prevents overflow issues */
}

/* Sidebar Styles */
.sidebar {
    width: 100%;
    margin-top: 1.5rem;
}

@media (min-width: 1024px) {
    .sidebar {
        width: 20rem; /* 320px */
        margin-left: 1.5rem;
        margin-top: 0;
        flex-shrink: 0; /* Prevents sidebar from shrinking */
    }
}

/* Sidebar Widgets */
.sidebar-widget {
    margin-bottom: 1.5rem;
}

.widget-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.widget-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.widget-header {
    padding: 1rem;
    color: white;
    font-weight: 600;
}

.widget-content {
    padding: 1rem;
}

/* Navigation Links in Sidebar */
.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    color: #374151;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.sidebar-nav-link:hover {
    background-color: #eff6ff;
    color: #1d4ed8;
    transform: translateX(4px);
}

/* Social Share Buttons */
.social-share-btn {
    padding: 0.5rem;
    border-radius: 9999px;
    color: white;
    transition: all 0.2s ease;
    text-decoration: none;
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Popular Tools */
.popular-tool-item {
    margin-bottom: 0.75rem;
}

.popular-tool-item:last-child {
    margin-bottom: 0;
}

.popular-tool-item a {
    display: block;
    padding: 0.75rem;
    background-color: #f9fafb;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.popular-tool-item a:hover {
    background-color: #eff6ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Mini Calendar */
.mini-calendar {
    text-align: center;
}

.mini-calendar a {
    color: #2563eb;
    text-decoration: none;
}

.mini-calendar a:hover {
    text-decoration: underline;
}

/* Ezoic Ad Placeholders - Minimal styling since Ezoic handles everything */
[id^="ezoic-pub-ad-placeholder"] {
    margin: 1rem 0;
    text-align: center;
}

/* Sticky Sidebar Ad (Desktop Only) */
@media (min-width: 1024px) {
    .sidebar .sticky {
        position: sticky;
        top: 1.5rem;
        z-index: 10;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .sidebar {
        margin-top: 2rem;
    }
    
    .sidebar-widget {
        margin-bottom: 1rem;
    }
    
    .widget-content {
        padding: 0.75rem;
    }
    
    .widget-header {
        padding: 0.75rem;
    }
    
    [id^="ezoic-pub-ad-placeholder"] {
        margin: 0.75rem 0;
    }
}

/* Responsive Text Sizes */
@media (max-width: 640px) {
    .widget-header h3 {
        font-size: 1rem;
    }
    
    .sidebar-nav-link {
        font-size: 0.875rem;
    }
}

/* Accessibility Improvements */
.sidebar-nav-link:focus,
.social-share-btn:focus,
.popular-tool-item a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .widget-card {
        /* background-color: #1f2937; */
        border-color: #374151;
        color: #1f2020;
    }
    
    .sidebar-nav-link {
        color: #1f2020;
    }
    
    .sidebar-nav-link:hover {
        background-color: #ffffff;
        color: #1f2020;
    }
    
    .popular-tool-item a {
        background-color: #ffffff;
        color: #1f2020;
    }
    
    .popular-tool-item a:hover {
        background-color: #ffffff;
    }
}

/* Print Styles - Hide Sidebar */
@media print {
    .sidebar {
        display: none !important;
    }
    
    .main-content {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* Loading States */
.widget-loading {
    opacity: 0.6;
    pointer-events: none;
}

.widget-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #cbd5e1;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animation for Sidebar Entrance */
.sidebar {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Widget Hover Effects */
.widget-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.widget-card:hover {
    transform: translateY(-2px);
}

/* Gradient Animations */
.widget-header {
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}