/**
 * Sidebar Styles
 *
 * Minimal and modern styling for sidebar
 *
 * @package Nila
 * @since 1.0.0
 */

/* ============================================
   Main Sidebar
   ============================================ */
.sidebar {
    padding: 0 15px;
}

.sidebar-inner {
    padding: 0;
}

/* ============================================
   Widgets
   ============================================ */
.widget {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.widget:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.widget-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
}

/* ============================================
   Widget Lists
   ============================================ */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget ul li a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 14px;
    display: block;
}

.widget ul li a:hover {
    color: #667eea;
}

/* ============================================
   Widget Text
   ============================================ */
.widget_text {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

.widget_text p {
    margin-bottom: 15px;
}

/* ============================================
   Search Widget
   ============================================ */
.widget_search .search-form {
    display: flex;
    gap: 8px;
}

.widget_search .search-field {
    flex: 1;
    padding: 10px 15px;
    font-size: 14px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s ease;
    background: #fff;
}

.widget_search .search-field:focus {
    border-color: #1a1a1a;
}

.widget_search .search-submit {
    padding: 10px 20px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.widget_search .search-submit:hover {
    background: #667eea;
}

/* ============================================
   Recent Posts Widget
   ============================================ */
.widget_recent_entries ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.widget_recent_entries ul li a {
    flex: 1;
}

.widget_recent_entries .post-date {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 4px;
}

/* ============================================
   Categories Widget
   ============================================ */
.widget_categories ul li {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget_categories .count {
    font-size: 12px;
    color: #999;
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e5e5e5;
}

/* ============================================
   Tag Cloud Widget
   ============================================ */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tagcloud a {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px !important;
    color: #666;
    text-decoration: none;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.tagcloud a:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* ============================================
   Calendar Widget
   ============================================ */
.widget_calendar table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e5e5e5;
}

.widget_calendar th,
.widget_calendar td {
    padding: 8px;
    text-align: center;
    border: 1px solid #e5e5e5;
}

.widget_calendar th {
    background: #f8f9fa;
    font-weight: 500;
    font-size: 12px;
    color: #1a1a1a;
}

.widget_calendar td a {
    color: #667eea;
    font-weight: 500;
}

/* ============================================
   RSS Widget
   ============================================ */
.widget_rss ul li {
    padding: 15px 0;
}

.widget_rss .rss-date {
    font-size: 12px;
    color: #999;
    display: block;
    margin-top: 5px;
}

.widget_rss cite {
    font-size: 12px;
    color: #999;
    font-style: normal;
    display: block;
    margin-top: 5px;
}

/* ============================================
   Archive Widget
   ============================================ */
.widget_archive ul li {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.widget_archive .count {
    font-size: 12px;
    color: #999;
}

/* ============================================
   Meta Widget
   ============================================ */
.widget_meta ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget_meta ul li a::before {
    content: '→';
    color: #999;
    font-size: 12px;
}

/* ============================================
   Pages Widget
   ============================================ */
.widget_pages ul li {
    padding-left: 15px;
}

.widget_pages ul li ul {
    margin-top: 10px;
    padding-left: 15px;
}

/* ============================================
   Recent Comments Widget
   ============================================ */
.widget_recent_comments ul li {
    padding: 12px 0;
    font-size: 13px;
    line-height: 1.6;
    color: #666;
}

.widget_recent_comments .comment-author-link {
    color: #1a1a1a;
    font-weight: 500;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        padding: 0 10px;
        margin-top: 40px;
    }
    
    .widget {
        margin-bottom: 30px;
        padding-bottom: 25px;
    }
    
    .widget-title {
        font-size: 11px;
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
}

/* ============================================
   Contact Info Widget (Sidebar)
   ============================================ */
.sidebar .nila-contact-info-widget-content {
    padding: 0;
}

.sidebar .nila-contact-info-widget-content .nila-contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.sidebar .nila-contact-info-widget-content .nila-contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f5f5f5;
    transition: transform 0.2s ease;
}

.sidebar .nila-contact-info-widget-content .nila-contact-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar .nila-contact-info-widget-content .nila-contact-info-item:hover {
    transform: translateX(3px);
}

.sidebar .nila-contact-info-widget-content .contact-info-icon {
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #e5e5e5;
    transition: all 0.2s ease;
}

.sidebar .nila-contact-info-widget-content .nila-contact-info-item:hover .contact-info-icon {
    background: #1a1a1a;
    border-color: #1a1a1a;
}

.sidebar .nila-contact-info-widget-content .contact-info-icon i {
    color: #667eea;
    font-size: 16px;
    transition: color 0.2s ease;
}

.sidebar .nila-contact-info-widget-content .nila-contact-info-item:hover .contact-info-icon i {
    color: #fff;
}

.sidebar .nila-contact-info-widget-content .contact-info-content {
    flex: 1;
}

.sidebar .nila-contact-info-widget-content .contact-info-content strong {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 6px;
    font-weight: 600;
}

.sidebar .nila-contact-info-widget-content .contact-info-content a,
.sidebar .nila-contact-info-widget-content .contact-info-content span {
    display: block;
    font-size: 14px;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.6;
}

.sidebar .nila-contact-info-widget-content .contact-info-content a:hover {
    color: #667eea;
}

.sidebar .nila-contact-info-widget-content .nila-contact-social {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e5e5e5;
}

.sidebar .nila-contact-info-widget-content .nila-social-title {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar .nila-contact-info-widget-content .nila-social-networks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sidebar .nila-contact-info-widget-content .nila-social-network-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    transition: all 0.2s ease;
}

.sidebar .nila-contact-info-widget-content .nila-social-network-link:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.sidebar .nila-contact-info-widget-content .nila-social-network-link i {
    font-size: 16px;
}

/* Horizontal Layout in Sidebar */
.sidebar .nila-contact-info-widget-content.nila-contact-info-horizontal .nila-contact-info-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.sidebar .nila-contact-info-widget-content.nila-contact-info-horizontal .nila-contact-info-item {
    flex-direction: column;
    text-align: center;
    padding-bottom: 0;
    border-bottom: none;
    border-right: 1px solid #f5f5f5;
    padding-right: 20px;
}

.sidebar .nila-contact-info-widget-content.nila-contact-info-horizontal .nila-contact-info-item:last-child {
    border-right: none;
    padding-right: 0;
}

.sidebar .nila-contact-info-widget-content.nila-contact-info-horizontal .contact-info-icon {
    margin: 0 auto 10px;
}

/* ============================================
   RTL Support
   ============================================ */
.rtl .widget_pages ul li {
    padding-left: 0;
    padding-right: 15px;
}

.rtl .widget_pages ul li ul {
    padding-left: 0;
    padding-right: 15px;
}

.rtl .widget_meta ul li a::before {
    content: '←';
}

.rtl .nila-contact-info-widget-content.nila-contact-info-horizontal .nila-contact-info-item {
    border-right: none;
    border-left: 1px solid #f5f5f5;
    padding-right: 0;
    padding-left: 20px;
}

.rtl .nila-contact-info-widget-content.nila-contact-info-horizontal .nila-contact-info-item:last-child {
    border-left: none;
    padding-left: 0;
}

