/**
 * Q&A Veterinalia - Responsive Styles
 * 
 * @package QAVeterinalia
 * @version 0.3.0 - Modular
 */

/* ============================================================
   RESPONSIVE DESIGN - TABLET
   ============================================================ */
@media screen and (max-width: 768px) {
    .qav-recent-list {
        margin: 0;
    }

    .qav-listing-photo {
        width: 55px;
        height: 55px;
    }

    .qav-answer-wrapper {
        gap: 12px;
    }

    .qav-answer-content-box {
        padding: 12px;
    }

    .qav-listing-name {
        font-size: 1.05em;
    }

    .qav-question-box {
        padding: 15px;
    }
}

/* ============================================================
   RESPONSIVE DESIGN - MOBILE
   ============================================================ */
@media screen and (max-width: 480px) {
    .qav-recent-list {
        margin: 0;
        padding: 0;
    }

    .qav-listing-photo {
        width: 50px;
        height: 50px;
    }

    .qav-answer-wrapper {
        gap: 10px;
    }

    .qav-answer-content-box {
        padding: 10px;
    }

    .qav-listing-name {
        font-size: 1em;
    }

    .qav-listing-rating {
        font-size: 0.8em;
        padding: 2px 6px;
    }

    .qav-answer-text {
        font-size: 0.9em;
    }

    .qav-question-box {
        padding: 12px;
    }

    .qav-question-title {
        font-size: 0.9em;
    }

    .qav-question-description {
        font-size: 0.85em;
    }

    .qav-item-separator {
        margin: 20px 0;
    }
}

@media (max-width: 600px) {
    .qav-professionals-list {
        grid-template-columns: 1fr;
    }

    .qav-auth-container {
        padding-bottom: 20px;
    }

    .qav-tab-content {
        padding: 30px 20px;
    }
}

/* ============================================================
   RESPONSIVE - MOBILE APP VIEW
   ============================================================ */
@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    body {
        background-color: var(--bg-body);
        padding-bottom: 80px;
    }

    .sidebar {
        display: none !important;
    }

    /* Drawer Menu */
    .drawer-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
    }

    .drawer-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .drawer {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100%;
        background: var(--white);
        z-index: 2001;
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        padding: 2rem 1.5rem;
    }

    .drawer.active {
        left: 0;
    }

    .drawer-link {
        padding: 1rem 0;
        font-size: 1.1rem;
        color: var(--text-main);
        border-bottom: 1px solid #f3f4f6;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .drawer-link i {
        width: 24px;
        color: var(--text-light);
    }

    /* Mobile Hero */
    .app-hero {
        border-radius: 0 0 24px 24px;
        padding: 2rem 1rem 3rem 1rem;
    }

    .app-hero h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    /* Composer Mobile */
    .qav-question-composer {
        margin: 0 auto;
        width: 100%;
    }

    .qav-composer-container {
        border-radius: 16px;
        padding: 10px 10px 10px 14px;
        box-shadow: none;
        border-width: 2px;
    }

    .qav-composer-input {
        font-size: 16px;
        box-shadow: none !important;
    }

    .qav-composer-input:focus {
        box-shadow: none !important;
    }

    .qav-composer-main-btn {
        width: 44px;
        height: 44px;
    }

    .qav-composer-speed-dial {
        right: 0;
        left: 0;
        align-items: stretch;
    }

    .qav-composer-topic-btn {
        width: 100%;
        text-align: center;
    }

    .qav-composer-char-count {
        right: 12px;
        bottom: -22px;
    }

    /* Categories Scroll */
    .cat-scroll-container {
        padding: 1rem 0 0.5rem 0;
        overflow-x: auto;
        white-space: nowrap;
        -ms-overflow-style: none;
        scrollbar-width: none;
        display: block;
        margin-bottom: 1rem;
        width: 100vw;
        margin-left: -1rem;
        padding-left: 1rem;
    }

    .cat-scroll-container::-webkit-scrollbar {
        display: none;
    }

    .cat-pill {
        display: inline-block;
        padding: 0.6rem 1.2rem;
        background: var(--white);
        border: 1px solid var(--border-color);
        border-radius: 20px;
        margin-right: 0.8rem;
        font-size: 0.9rem;
        font-weight: 500;
        color: var(--text-main);
    }

    .cat-pill.active {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        box-shadow: 0 2px 5px rgba(233, 30, 99, 0.3);
    }

    /* Feed Layout */
    .main-layout {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 1rem !important;
        margin: 0 !important;
        padding: 0 1rem !important;
    }

    .feed {
        width: 100% !important;
        max-width: 100% !important;
        flex: auto !important;
        margin: 0 !important;
    }

    .feed-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        margin-bottom: 1rem !important;
        flex-wrap: nowrap !important;
    }

    .feed-header h2 {
        font-size: 1.3rem !important;
        white-space: nowrap;
        margin: 0;
    }

    /* Question Cards */
    .question-card {
        border-radius: 16px;
        padding: 1.2rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
        border: 1px solid #f0f0f0;
    }

    /* Live Search Results Mobile */
    .qav-live-search-results {
        max-height: 300px;
    }

    .qav-search-result-item {
        padding: 0.75rem 1rem;
    }

    /* Modal - Centered for Mobile */
    #question-modal.modal-overlay {
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.7);
        padding: 1rem;
        display: flex !important;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    #question-modal.active {
        opacity: 1;
        visibility: visible;
    }

    #question-modal .auth-card {
        width: 100%;
        max-width: 500px;
        max-height: 90vh;
        border-radius: 16px;
        margin: 0;
        padding: 0;
        transform: scale(0.9);
        opacity: 0;
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
        flex-direction: column;
        display: flex !important;
        position: relative;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }

    #question-modal.active .auth-card {
        transform: scale(1);
        opacity: 1;
    }

    .auth-visual {
        display: none !important;
    }

    .auth-form-container {
        padding: 1.5rem;
        width: 100%;
        overflow-y: auto;
        max-height: 90vh;
    }

    .close-modal-btn {
        display: flex !important;
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.1);
        border: none;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        z-index: 10;
        transition: background 0.2s ease;
        color: var(--text-main);
        font-size: 1.2rem;
    }

    .close-modal-btn:hover {
        background: rgba(0, 0, 0, 0.2);
    }

    .sheet-handle {
        display: none !important;
    }
}