/* Desktop-specific CSS for Facebook-style UI */

/* Enhanced Left Sidebar for Desktop */
@media (min-width: 992px) {
    .facebook-left-sidebar {
        position: sticky;
        top: 60px;
        height: calc(100vh - 60px);
        padding-right: 0;
        padding-left: 0;
        max-width: 250px;
    }
    
    .left-sidebar-wrapper {
        padding-top: 0;
    }
    
    .sidebar-menu-item {
        border-radius: 4px;
        margin-bottom: 1px;
        padding: 8px 10px;
    }
    
    .sidebar-menu-item:hover {
        background-color: #f0f2f5;
    }
    
    /* Fix layout for main content column */
    .facebook-main-content {
        max-width: calc(100% - 250px - 300px); /* 300px is for right sidebar */
        margin: 0 auto;
    }
    
    /* Update column sizes */
    .col-lg-3.facebook-left-sidebar {
        flex: 0 0 auto;
        width: 220px;
    }
    
    .col-lg-6.facebook-main-content {
        flex: 0 0 auto;
        width: calc(100% - 220px - 300px);
    }
}

/* Desktop Search Bar */
.desktop-search-container {
    max-width: 220px;
    flex-grow: 1;
}

.desktop-search {
    position: relative;
    width: 100%;
    max-width: 220px;
}

.desktop-search-input {
    background-color: #f0f2f5;
    border: none;
    border-radius: 18px;
    padding: 6px 10px 6px 32px;
    font-size: 14px;
    width: 100%;
    outline: none;
}

.desktop-search-input:focus {
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.desktop-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #65676b;
    font-size: 13px;
}

/* Desktop Navigation Icons */
.desktop-nav-icons {
    display: flex;
    gap: 8px;
    margin-right: 8px;
}

.desktop-nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #050505;
    font-size: 16px;
    transition: all 0.2s;
}

.desktop-nav-icon:hover {
    background-color: #e4e6eb;
}

/* Desktop Tab Styles */
@media (min-width: 768px) {
    .facebook-tabs {
        padding: 0 !important;
    }
    
    .facebook-tab {
        padding: 12px 24px;
        position: relative;
        min-width: auto;
        justify-content: center;
        border-bottom: 3px solid transparent;
    }
    
    .facebook-tab-icon {
        font-size: 22px;
        margin-bottom: 0;
    }
    
    .tab-label {
        display: none !important;
    }
    
    .facebook-tab-active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background-color: #1877f2;
    }
    
    .facebook-tab-active .facebook-tab-icon {
        color: #1877f2;
    }
    
    .facebook-tab:hover:not(.facebook-tab-active) {
        background-color: #f0f2f5;
    }
}

@media (min-width: 992px) {
    .facebook-tab {
        padding: 15px 28px;
    }
}

@media (min-width: 1200px) {
    .facebook-tab {
        padding: 15px 36px;
    }
    
    .quick-access-item {
        min-width: 120px;
    }
}

/* Desktop Quick Access */
@media (min-width: 768px) {
    .facebook-quick-access {
        border-bottom: 1px solid #e4e6eb;
    }
    
    .quick-access-wrapper {
        justify-content: center;
        padding: 8px 0;
    }
    
    .quick-access-item {
        min-width: 110px;
        border-radius: 10px;
        padding: 10px 0;
    }
    
    .quick-access-icon {
        width: 42px;
        height: 42px;
        margin-bottom: 6px;
    }
    
    .quick-access-label {
        font-size: 13px;
        font-weight: 500;
    }
}

/* Desktop Left Sidebar */
@media (min-width: 992px) {
    .facebook-left-sidebar {
        padding-right: 8px;
        background-color: white;
        margin-top: 16px;
        box-shadow: none;
    }
    
    .left-sidebar-wrapper {
        padding: 12px 8px;
    }
    
    .sidebar-menu-item {
        padding: 8px 12px;
        font-weight: 500;
        font-size: 15px;
    }
    
    .sidebar-icon {
        margin-right: 12px;
        width: 36px;
        height: 36px;
    }
    
    .blue-icon {
        background-color: #e7f3ff;
        color: #1877f2;
    }
    
    .profile-menu-item {
        margin-bottom: 12px;
    }
    
    .profile-name {
        font-size: 15px;
        font-weight: 600;
    }
    
    .sidebar-profile img {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
    }
    
    .sidebar-footer {
        margin-top: 24px;
        border-top: 1px solid #e4e6eb;
        padding-top: 16px;
    }
}

/* Desktop Right Sidebar */
@media (min-width: 992px) {
    .facebook-right-sidebar {
        padding-left: 16px;
    }
    
    .right-sidebar-wrapper {
        padding: 20px 10px;
    }
    
    .sidebar-section {
        margin-bottom: 24px;
    }
    
    .sidebar-section-title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
    }
    
    .desktop-control-icons {
        display: flex;
        align-items: center;
    }
    
    .desktop-control-icon {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background-color: #f0f2f5;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #65676b;
        transition: all 0.2s;
    }
    
    .desktop-control-icon:hover {
        background-color: #e4e6eb;
    }
    
    .contact-list {
        padding-top: 10px;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .contact-item {
        display: flex;
        align-items: center;
        padding: 6px 8px;
        border-radius: 8px;
        text-decoration: none;
        color: #050505;
        transition: background-color 0.2s;
    }
    
    .contact-item:hover {
        background-color: #f0f2f5;
    }
    
    .contact-status {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background-color: #31a24c;
        border: 2px solid white;
    }
    
    .contact-status.online {
        background-color: #31a24c;
    }
    
    .contact-status.offline {
        background-color: #ccc;
    }
    
    .contact-name {
        font-size: 14px;
        font-weight: 500;
    }
    
    .sponsored-item {
        text-decoration: none;
        color: inherit;
        transition: opacity 0.2s;
    }
    
    .sponsored-item:hover {
        opacity: 0.9;
    }
    
    .sidebar-footer {
        margin-top: 32px;
        padding: 12px 8px;
        border-top: 1px solid #e4e6eb;
    }
    
    .footer-links {
        font-size: 12px;
        color: #65676b;
    }
    
    .footer-link {
        color: #65676b;
        text-decoration: none;
    }
    
    .footer-link:hover {
        text-decoration: underline;
    }
    
    .copyright {
        font-size: 12px;
        color: #65676b;
    }
}

/* Desktop Content Area */
@media (min-width: 992px) {
    .facebook-main-content {
        padding: 0 12px;
        max-width: 700px;
        margin: 0 auto;
    }
    
    .card {
        border-radius: 10px !important;
    }
    
    .create-post {
        padding: 12px 16px !important;
    }
}

/* Desktop Story Section */
@media (min-width: 992px) {
    .story-section {
        margin: 20px 0;
    }
    
    .story-card {
        transition: transform 0.3s, box-shadow 0.3s;
    }
    
    .story-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }
}

/* Desktop Post Items */
@media (min-width: 992px) {
    .post-item {
        border-radius: 10px;
        overflow: hidden;
        transition: box-shadow 0.3s;
    }

    .post-item:hover {
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .post-header {
        padding: 15px !important;
    }

    .post-content {
        padding: 0 1px 1px !important;
    }

    .post-actions {
        padding: 10px 15px !important;
    }
}

/* 📱 COMPREHENSIVE RESPONSIVE DESIGN FOR DESKTOP LAYOUT */

/* 📱 MOBILE-FIRST BASE STYLES (320px+) */
/* Hide desktop-specific elements on mobile */
@media (max-width: 767px) {
    .desktop-search-container,
    .desktop-nav-icons,
    .facebook-left-sidebar,
    .facebook-right-sidebar {
        display: none !important;
    }

    .facebook-main-content {
        width: 100% !important;
        margin: 0 !important;
    }
}

/* 📱 TABLET OPTIMIZATION (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .desktop-search-container {
        max-width: 200px;
        flex-grow: 1;
    }

    .desktop-search {
        max-width: 200px;
    }

    .desktop-search-input {
        padding: 7px 12px 7px 34px;
        font-size: 15px;
    }

    .desktop-search-icon {
        left: 11px;
        font-size: 14px;
    }

    .desktop-nav-icon {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .facebook-left-sidebar {
        max-width: 200px;
    }

    .facebook-main-content {
        max-width: calc(100% - 200px);
    }

    .col-lg-3.facebook-left-sidebar {
        width: 200px;
    }

    .col-lg-6.facebook-main-content {
        width: calc(100% - 200px);
    }
}

/* 💻 DESKTOP LAYOUT (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
    .desktop-search-container {
        max-width: 240px;
        flex-grow: 1;
    }

    .desktop-search {
        max-width: 240px;
    }

    .desktop-search-input {
        padding: 8px 14px 8px 36px;
        font-size: 16px;
    }

    .desktop-search-icon {
        left: 12px;
        font-size: 15px;
    }

    .desktop-nav-icon {
        width: 42px;
        height: 42px;
        font-size: 17px;
    }

    .facebook-left-sidebar {
        max-width: 240px;
    }

    .facebook-main-content {
        max-width: calc(100% - 240px - 280px);
    }

    .col-lg-3.facebook-left-sidebar {
        width: 240px;
    }

    .col-lg-6.facebook-main-content {
        width: calc(100% - 240px - 280px);
    }

    .sidebar-menu-item {
        padding: 10px 12px;
        font-size: 15px;
    }
}

/* 🖥️ LARGE DESKTOP (1200px+) */
@media (min-width: 1200px) {
    .desktop-search-container {
        max-width: 280px;
        flex-grow: 1;
    }

    .desktop-search {
        max-width: 280px;
    }

    .desktop-search-input {
        padding: 10px 16px 10px 40px;
        font-size: 18px;
        border-radius: 24px;
    }

    .desktop-search-icon {
        left: 14px;
        font-size: 16px;
    }

    .desktop-nav-icon {
        width: 46px;
        height: 46px;
        font-size: 18px;
        margin: 0 4px;
    }

    .facebook-left-sidebar {
        max-width: 280px;
    }

    .facebook-main-content {
        max-width: calc(100% - 280px - 320px);
    }

    .col-lg-3.facebook-left-sidebar {
        width: 280px;
    }

    .col-lg-6.facebook-main-content {
        width: calc(100% - 280px - 320px);
    }

    .sidebar-menu-item {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 8px;
    }

    .sidebar-menu-item:hover {
        background-color: #f0f2f5;
        transform: translateX(4px);
    }
}

/* 📱 SMALL MOBILE ENHANCEMENTS (320px - 480px) */
@media (max-width: 480px) {
    /* Ensure mobile elements are properly sized */
    .mobile-search-icon,
    .facebook-icon {
        min-width: 44px;
        min-height: 44px;
    }

    .mobile-logo {
        max-width: 100px;
    }
}

/* 📱 EXTRA SMALL MOBILE (320px - 375px) */
@media (max-width: 375px) {
    .mobile-logo {
        max-width: 80px;
    }

    .facebook-icon {
        width: 40px !important;
        height: 40px !important;
    }
}

/* ♿ ACCESSIBILITY ENHANCEMENTS FOR DESKTOP */
@media (min-width: 1024px) {
    /* Focus states for keyboard navigation */
    .desktop-nav-icon:focus,
    .sidebar-menu-item:focus {
        outline: 2px solid #1877f2;
        outline-offset: 2px;
    }

    /* High contrast mode support */
    @media (prefers-contrast: high) {
        .desktop-nav-icon {
            border: 1px solid #000;
        }

        .sidebar-menu-item {
            border: 1px solid #000;
        }
    }

    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce) {
        .desktop-nav-icon,
        .sidebar-menu-item,
        .post-item {
            transition: none;
        }
    }
}

/* 🌙 DARK MODE SUPPORT FOR DESKTOP */
@media (min-width: 1024px) and (prefers-color-scheme: dark) {
    .desktop-search-input {
        background-color: #3a3b3c;
        color: #e4e6ea;
    }

    .desktop-search-input::placeholder {
        color: #b0b3b8;
    }

    .desktop-nav-icon {
        background-color: #3a3b3c;
        color: #e4e6ea;
    }

    .sidebar-menu-item {
        color: #e4e6ea;
    }

    .sidebar-menu-item:hover {
        background-color: #4e4f50;
    }
}

/* 📱 TOUCH DEVICE OPTIMIZATIONS */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices - increase touch targets */
    .desktop-nav-icon {
        min-width: 48px;
        min-height: 48px;
    }

    .sidebar-menu-item {
        min-height: 48px;
        padding: 14px 16px;
    }
}

/* 🖥️ ULTRA-WIDE DISPLAY SUPPORT (1440px+) */
@media (min-width: 1440px) {
    .facebook-left-sidebar {
        max-width: 320px;
    }

    .facebook-main-content {
        max-width: calc(100% - 320px - 360px);
    }

    .col-lg-3.facebook-left-sidebar {
        width: 320px;
    }

    .col-lg-6.facebook-main-content {
        width: calc(100% - 320px - 360px);
    }

    .desktop-search-container {
        max-width: 320px;
    }

    .desktop-search {
        max-width: 320px;
    }
}
