/* ===============================================
   Interaction Menu & Sidebars Styles
   Left Sidebar (Interaction Menu) & Right Sidebar (Social Footer)
   Compatible with sticky header (z-index: 99)
   Version: 1.0
   =============================================== */

/* ==========================================
   LEFT SIDEBAR - INTERACTION MENU STYLES
   ========================================== */

/* Main Interaction Sidebar Container */
.blog-sidebar-interaction {
    display: block;
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--interaction-sticky-top, 120px) + var(--interaction-sticky-gap, 0px)); /* Matches actual header height + gap */
    height: auto;
    max-height: var(--interaction-sticky-max-height, calc(100vh - 140px));
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #fff;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 220px; /* Prevent full-width when it becomes fixed */
    z-index: 1;
    transition: none;
}

/* Custom scrollbar for sidebar */
.blog-sidebar-interaction::-webkit-scrollbar {
    width: 6px;
}

.blog-sidebar-interaction::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.blog-sidebar-interaction::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.blog-sidebar-interaction::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Fixed positioning alternatives */
.fixed-inter-menu {
    position: sticky !important;
    top: calc(var(--interaction-sticky-top, 120px) + var(--interaction-sticky-gap, 0px)) !important;
    width: 100%;
    max-width: 220px;
}

.fixed-footer-menu {
    position: sticky !important;
    top: calc(var(--interaction-sticky-top, 120px) + var(--interaction-sticky-gap, 0px)) !important;
    max-width: 320px;
}

/* Utility width class */
.w-300px {
    width: 300px !important;
}

/* Profile Container Styles */
.blog-sidebar-interaction .profile-container {
    width: 100%;
    position: relative;
    height: 65px;
    margin-bottom: 50px;
}

/* Cover Image */
.blog-sidebar-interaction .cover-image {
    width: 100%;
    background-color: #d8d8d8;
    height: 100%;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.blog-sidebar-interaction .cover-image img {
    width: 100%;
    background-color: #d8d8d8;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* Profile Main Image */
.blog-sidebar-interaction .profile-main-image {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    border: 3px solid white;
    position: absolute;
    overflow: hidden;
    left: 10px;
    right: 0;
    /*margin: 0px auto;*/
    bottom: -40px;
    background-color: #a4a4a4;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.blog-sidebar-interaction .profile-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* User Info */
.blog-sidebar-interaction .user-info {
    margin: 25px 0px 10px 0px;
    padding-left: 10px;
}

.blog-sidebar-interaction .username {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    padding-left:10px;
}

.blog-sidebar-interaction .author-name {
    display: block;
}

.blog-sidebar-interaction .author-username {
    display: block;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.2;
    margin-top: 2px;
    opacity: 0.75;
    color:#808080;
}

.blog-sidebar-interaction .sidebar-follow-row {
    padding-left: 10px;
}

.blog-sidebar-interaction .sidebar-follow-link {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.blog-sidebar-interaction .sidebar-follow-link:hover .sidebar-follow-label {
    color: #1b74e4;
    opacity: 1;
}

/* Widget Styles */
.blog-sidebar-interaction .blog-widget .widget-body {
    padding-bottom: 0px !important;
}

.blog-sidebar .blog-widget .widget-body {
    padding: 20px 20px 20px 20px !important;
}

.blog-widget {
    background-color: transparent !important;
    box-shadow: none !important;
}

.blog-sidebar .blog-widget .widget-title {
    border-bottom: 1px solid #ddd !important;
}

/* Post Button */
.post-button {
    width: 100%;
    text-align: center;
    margin: 10px 0px;
}

.post-button a {
    background-color: #1b74e4;
    color: #fff;
    padding: 10px 50px;
    border-radius: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.post-button a:hover {
    background-color: #0d5cbf;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 116, 228, 0.3);
}

/* Interaction List */
.interaction-list li {
    padding: 14px 0px;
    transition: background-color 0.2s ease;
}

.interaction-list li:hover {
    background-color: #f8f9fa;
}

.interaction-list li:last-child {
    padding: 0px;
}

.interaction-list li span {
    font-size: 15px !important;
    font-weight: normal !important;
}

/* ==========================================
   FOLLOW PAGE LEFT SIDEBAR
   ========================================== */

.follow-left-sidebar {
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ==========================================
   RIGHT SIDEBAR - SOCIAL FOOTER STYLES
   ========================================== */

/* Social Footer Wrapper */
.follow-right-sidebar,
.social-footer-wrapper {
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Social Footer Specific Styles */
.social-footer .black-caption {
    color: #000 !important;
}

.social-footer .footer-main-wrapper .footer-about .footer-social-wrap .footer-social-links li {
    padding-top: 0px !important;
}

/* Policy Links */
.policy-links ul li {
    padding-top: 0px !important;
}

.policy-links ul li a {
    font-size: 14px !important;
    color: #6c757d;
    transition: color 0.2s ease;
}

.policy-links ul li a:hover {
    color: #1b74e4;
}

/* ==========================================
   STICKY SIDEBAR UTILITIES
   ========================================== */

/*
    Layout sizing
    Use with Bootstrap: .row + (col-lg-auto | col-lg | col-lg-auto)
    Sidebars keep fixed max widths on large screens.
*/

.interaction-left-sidebar {
        width: 220px;
        max-width: 220px;
}

.interaction-right-sidebar {
        width: 320px;
        max-width: 320px;
}

/* General Sticky Sidebar */
.sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: calc(var(--interaction-sticky-top, 120px) + var(--interaction-sticky-gap, 0px)); /* Matches actual header height + gap */
    z-index: 1;
    transition: none;
    max-height: var(--interaction-sticky-max-height, calc(100vh - 140px)); /* Viewport height minus header and padding */
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for sticky sidebars */
.sticky-sidebar::-webkit-scrollbar {
    width: 6px;
}

.sticky-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sticky-sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.sticky-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Note: header/scroll adjustments are handled via CSS variables from main.js */

/* Responsive sizing for sidebars (still only shown on lg+ in the Blade) */
@media (min-width: 992px) and (max-width: 1199px) {
    .interaction-left-sidebar {
        width: 180px;
        max-width: 180px;
    }

    .interaction-right-sidebar {
        width: 240px;
        max-width: 240px;
    }
}

@media (min-width: 1200px) and (max-width: 1599px) {
    .interaction-left-sidebar {
        width: 200px;
        max-width: 200px;
    }

    .interaction-right-sidebar {
        width: 280px;
        max-width: 280px;
    }
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 991px) {
    /* Disable sticky on tablets and mobile */
    .sticky-sidebar,
    .blog-sidebar-interaction {
        position: static !important;
        top: auto !important;
        margin-bottom: 20px;
    }
    
    .blog-sidebar-interaction {
        max-width: 100%;
    }
    
    .follow-left-sidebar,
    .follow-right-sidebar {
        margin-bottom: 20px;
    }
}

@media (max-width: 767px) {
    .blog-sidebar-interaction .username {
        font-size: 20px;
    }
    
    .blog-sidebar-interaction .profile-main-image {
        width: 70px;
        height: 70px;
    }
    
    .post-button a {
        padding: 8px 30px;
        font-size: 14px;
    }
}

/* ==========================================
   SPACING & ALIGNMENT UTILITIES
   ========================================== */

/* Equal spacing for three-column layout */
.interaction-layout-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.interaction-left-col,
.interaction-right-col {
    flex: 0 0 auto;
    width: 100%;
    max-width: 300px;
}

.interaction-main-col {
    flex: 1 1 auto;
    min-width: 0; /* Prevent flex item from overflowing */
}

/* Bootstrap column gap enhancement */
.row.interaction-row {
    --bs-gutter-x: 1.5rem;
}

.row.interaction-row > [class*="col-"] {
    padding-left: calc(var(--bs-gutter-x) * 0.5);
    padding-right: calc(var(--bs-gutter-x) * 0.5);
}

/* Ensure equal visual weight */
.interaction-sidebar-equal {
    min-height: 300px;
}

/* ==========================================
   SMOOTH ANIMATIONS
   ========================================== */

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

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

.follow-left-sidebar,
.blog-sidebar-interaction {
    animation: slideInLeft 0.4s ease-out;
}

.follow-right-sidebar,
.social-footer-wrapper {
    animation: slideInRight 0.4s ease-out;
}
