/* 
 * WC Charity Core - Responsive Override Layer
 * Enqueued before wcc-rtl.css via Assets::enqueue_assets()
 * Strictly scoped with .wcc-* namespaces
 */

/* --- 1. Global Table Overflow Strategy --- */
.wcc-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.wcc-table-wrapper table {
    min-width: max-content;
    width: 100%;
}

/* --- 2. Tier 1: Tablet Landscape / Small Laptops (1024px) --- */
@media (max-width: 1024px) {
    .wcc-campaign-grid {
        gap: 24px;
    }
}

/* --- 3. Tier 2: Tablet Portrait (768px) --- */
@media (max-width: 768px) {

    /* Layout Stacking (Verified Containers) */
    .wcc-campaign-grid {
        flex-direction: column;
    }

    .wcc-campaign-sidebar {
        width: 100% !important;
        order: 2;
        position: static !important;
        /* Remove sticky on mobile */
    }

    .wcc-campaign-main {
        width: 100% !important;
        order: 1;
    }

    .wcc-discovery-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .wcc-search-wrapper {
        min-width: 100%;
    }
}

/* --- 4. Tier 3: Mobile (480px) --- */
@media (max-width: 480px) {

    /* Selective Stacking for Interactions */
    .wcc-actions-left {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .wcc-donate-btn-large {
        width: 100%;
        justify-content: center;
    }

    .wcc-progress-suite {
        max-width: 100%;
        margin-top: 15px;
    }

    /* Touch Target Optimization (44px Minimum) */
    .wcc-icon-btn,
    .wcc-button-primary,
    .wcc-button-secondary,
    .wcc-donate-btn,
    .wcc-donate-btn-large {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .wcc-filter-controls select {
        width: 100%;
    }

    /* Modal Adjustments */
    .wcc-donation-root-container {
        padding: 20px;
        border-radius: 16px;
    }

    .wcc-modal-container .wcc-donation-root-container {
        width: 95%;
        min-width: unset;
    }
}