/**
 * Developer Zone Theme - Sidebar Styling
 */

/* Base sidebar styling */
.left-sidebar-area, 
.right-sidebar-area {
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

/* Distinct styling for left sidebar */
.left-sidebar-area {
    border-left: 3px solid var(--primary-color, #116f21);
}

/* Distinct styling for right sidebar */
.right-sidebar-area {
    border-right: 3px solid var(--primary-color, #116f21);
}

/* Widget styling */
.widget {
    margin-bottom: 30px;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    border-bottom: 1px solid #f0f0f0;
}

.widget-title:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color, #116f21);
}

/* Widget-specific styling */
.widget_search {
    position: relative;
}

.widget_search .search-field {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.widget_search .search-submit {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    background-color: var(--primary-color, #116f21);
    color: #fff;
    border: none;
    border-radius: 0 5px 5px 0;
    padding: 0 15px;
    cursor: pointer;
}

.widget_recent_entries li,
.widget_recent_comments li,
.widget_categories li,
.widget_archive li {
    border-bottom: 1px dashed #eee;
    padding: 8px 0;
    position: relative;
}

.widget_recent_entries li:last-child,
.widget_recent_comments li:last-child,
.widget_categories li:last-child,
.widget_archive li:last-child {
    border-bottom: none;
}

.widget_recent_entries a,
.widget_categories a,
.widget_archive a {
    position: relative;
    display: inline-block;
    padding-left: 15px;
    transition: all 0.3s ease;
}

.widget_recent_entries a:before,
.widget_categories a:before,
.widget_archive a:before {
    content: "›";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color, #116f21);
}

.widget_calendar table {
    width: 100%;
    text-align: center;
}

.widget_calendar caption {
    background-color: var(--primary-color, #116f21);
    color: #fff;
    padding: 5px;
    margin-bottom: 8px;
    font-weight: 600;
}

.widget_calendar th {
    background-color: #f5f5f5;
    border: 1px solid #eee;
    padding: 3px;
    text-align: center;
}

.widget_calendar td {
    border: 1px solid #eee;
    padding: 5px;
}

.widget_tag_cloud .tagcloud a {
    display: inline-block;
    font-size: 12px !important;
    background-color: #f5f5f5;
    color: #444;
    padding: 5px 10px;
    margin: 0 5px 5px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.widget_tag_cloud .tagcloud a:hover {
    background-color: var(--primary-color, #116f21);
    color: #fff;
}

.widget_recent_comments .recentcomments {
    margin-bottom: 10px;
}

.widget_recent_comments .comment-author-link {
    font-weight: 600;
    color: var(--primary-color, #116f21);
}

.widget_archive li {
    display: flex;
    justify-content: space-between;
}

.widget_archive li a {
    flex-grow: 1;
}

/* Mobile responsiveness for sidebars */
@media (max-width: 768px) {
    .left-sidebar-area, 
    .right-sidebar-area {
        margin-bottom: 30px;
    }
    
    /* Switch border styles on mobile */
    .left-sidebar-area {
        border-left: none;
        border-top: 3px solid var(--primary-color, #116f21);
    }
    
    .right-sidebar-area {
        border-right: none;
        border-bottom: 3px solid var(--primary-color, #116f21);
    }
    
    /* Ensure sidebars appear in correct order on mobile */
    .row {
        display: flex;
        flex-direction: column;
    }
    
    .left-sidebar-area {
        order: 1;
    }
    
    .site-main, 
    .content-area, 
    .recent-posts-area, 
    .slider-area {
        order: 3;
    }
    
    .right-sidebar-area, 
    .sidebar {
        order: 2;
    }
}

/* Special styling for two-sidebar template */
body.page-template-page-two-sidebars .content-area {
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    padding: 0 20px;
}

/* Body class based styling */
body.has-dual-sidebars .site-content {
    position: relative;
}

body.has-left-sidebar .content-area {
    padding-left: 15px;
}

body.has-right-sidebar .content-area {
    padding-right: 15px;
}

/* Sidebar switcher styles */
.sidebar-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.toggle-sidebar {
    padding: 8px 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.toggle-sidebar:hover {
    background-color: var(--primary-color, #116f21);
    color: white;
}

.sidebar-hidden {
    display: none !important;
}
