/* ========================================
   PAGE-SPECIFIC MOBILE STYLES
   ======================================== */

/* View Doc Page Mobile */
@media (max-width: 900px) {
    .doc-layout {
        grid-template-columns: 1fr !important;
    }

    .doc-main-card {
        padding: 1.5rem !important;
    }

    .doc-main-card h1 {
        font-size: 1.8rem !important;
    }

    .bookmark-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Forum Pages Mobile */
@media (max-width: 900px) {
    .forum-layout {
        grid-template-columns: 1fr !important;
    }

    .hero-forum {
        padding: 2rem 1rem !important;
    }

    .hero-forum h1 {
        font-size: 2rem !important;
    }

    .hero-forum p {
        font-size: 1rem !important;
    }

    .topic-item {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .topic-item>div:first-child {
        width: 40px !important;
        height: 40px !important;
    }
}

/* Forum Topic Mobile */
@media (max-width: 768px) {
    .reply-thread {
        margin-left: 0 !important;
        border-left: none !important;
        padding-left: 0 !important;
    }

    #mention-suggestions {
        max-height: 150px !important;
    }

    .card h1 {
        font-size: 1.5rem !important;
    }
}

/* Bug Pages Mobile */
@media (max-width: 900px) {
    .bugs-layout {
        grid-template-columns: 1fr !important;
    }

    .hero-bugs {
        padding: 2rem 1rem !important;
    }

    .hero-bugs h1 {
        font-size: 2rem !important;
    }

    .bug-item {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* Bug View Mobile */
@media (max-width: 768px) {
    .bug-view-layout {
        grid-template-columns: 1fr !important;
    }
}

/* DM Pages Mobile */
@media (max-width: 768px) {

    /* DM Inbox */
    .dm-inbox-layout {
        height: auto !important;
        max-height: none !important;
    }

    .dm-inbox-layout .col-md-4 {
        border-right: none !important;
        border-bottom: 1px solid var(--border);
    }

    .dm-inbox-layout .col-md-8 {
        display: none !important;
    }

    /* DM Chat */
    #chat-box {
        height: calc(100vh - 250px) !important;
        min-height: 400px;
    }

    .msg-bubble {
        max-width: 85% !important;
    }

    #edit-modal>div {
        width: 95% !important;
        padding: 1rem !important;
    }

    /* DM Create */
    .dm-create-container {
        max-width: 100% !important;
        padding: 1rem !important;
    }
}

/* My Page Mobile */
@media (max-width: 900px) {
    .mypage-layout {
        grid-template-columns: 1fr !important;
    }

    .notification-panel {
        max-height: 300px !important;
    }
}

/* Responsive Tables */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }
}

/* Mobile Form Improvements */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 1rem;
    }

    input,
    textarea,
    select {
        font-size: 16px !important;
        /* Prevents zoom on iOS */
    }

    .btn {
        min-height: 44px;
        /* Touch-friendly */
    }
}