/**
 * TimesBull Main Stylesheet - Additional Components
 * Version: 10.0.0
 */

/* ============================================
   SIDEBAR STYLES
   ============================================ */
.tb-sidebar {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
}

.widget {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

/* Popular Posts Widget */
.tb-popular-posts {
    list-style: none;
}

.tb-popular-posts li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.tb-popular-posts li:last-child {
    border-bottom: none;
}

.tb-popular-posts a {
    font-weight: 500;
}

.tb-popular-posts a:hover {
    color: var(--primary);
}

.tb-popular-count {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    margin-right: 10px;
}

/* Recent Posts Widget */
.tb-recent-posts {
    list-style: none;
}

.tb-recent-posts li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.tb-recent-posts li:last-child {
    border-bottom: none;
}

.tb-recent-posts a {
    font-weight: 500;
}

.tb-recent-posts a:hover {
    color: var(--primary);
}

.tb-recent-date {
    display: block;
    font-size: 11px;
    color: var(--text-lighter);
    margin-top: 4px;
}

/* Category Widget */
.tb-category-list {
    list-style: none;
}

.tb-category-list li {
    margin-bottom: 10px;
}

.tb-category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.tb-category-list a:hover {
    color: var(--primary);
}

.tb-category-count {
    background: var(--bg-light);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

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

.tagcloud a {
    background: var(--bg-light);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px !important;
    transition: all 0.2s ease;
}

.tagcloud a:hover {
    background: var(--primary);
    color: white;
}

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

.widget_search input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 30px;
    outline: none;
}

.widget_search button {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
}

/* Newsletter Widget */
.tb-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tb-newsletter-form input {
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 30px;
    outline: none;
}

.tb-newsletter-form button {
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
}

/* Social Links Widget */
.tb-social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.tb-social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-light);
    transition: all 0.2s ease;
}

.tb-social-links a:hover {
    transform: translateY(-3px);
}

.tb-social-links .facebook:hover { background: #1877f2; color: white; }
.tb-social-links .twitter:hover { background: #1da1f2; color: white; }
.tb-social-links .instagram:hover { background: #e4405f; color: white; }
.tb-social-links .youtube:hover { background: #ff0000; color: white; }
.tb-social-links .linkedin:hover { background: #0077b5; color: white; }

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
.tb-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.tb-scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.tb-scroll-top:hover {
    transform: translateY(-3px);
    background: var(--primary-dark);
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.tb-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ============================================
   RESPONSIVE SIDEBAR
   ============================================ */
@media (max-width: 992px) {
    .tb-sidebar {
        max-width: 100%;
        margin-top: 40px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .tb-sidebar,
    .tb-scroll-top,
    .tb-reading-progress {
        display: none;
    }
}