/* ============================================================================
   CONTACT VIEW TOGGLE STYLES
   Controls visibility of elements based on current view (Directory vs Cellular/Card)
   ============================================================================ */

/* ==========================================================================
   HIDE ELEMENTS IN CELLULAR VIEW AND CARD VIEW
   These elements only show in Directory view
   ========================================================================== */

/* When body has this class, hide directory-only elements */
body.hide-directory-only-elements .contact-usage-indicator,
body.hide-directory-only-elements #contactUsageIndicator {
    display: none !important;
}

/* Hide the entire filter section (Year, Month, Date Range, Amount, etc.) in Cellular/Card view */
body.hide-directory-only-elements .contact-filter-section,
body.hide-directory-only-elements #contactFilterSection {
    display: none !important;
}

/* Hide Bulk Delete button in Cellular/Card view */
body.hide-directory-only-elements .bulk-delete-btn,
body.hide-directory-only-elements [onclick*="bulkDelete"],
body.hide-directory-only-elements button[title*="Bulk Delete"] {
    display: none !important;
}

/* Hide Export button in Cellular/Card view */
body.hide-directory-only-elements button[onclick*="downloadCSV"],
body.hide-directory-only-elements button[title*="Export"],
body.hide-directory-only-elements .controls-right .btn-info {
    display: none !important;
}

/* Hide Import button/label in Cellular/Card view */
body.hide-directory-only-elements .file-upload-label,
body.hide-directory-only-elements label[for="uploadFile"],
body.hide-directory-only-elements #uploadFile {
    display: none !important;
}

/* Hide Renumber IDs button in Cellular/Card view */
body.hide-directory-only-elements button[onclick*="renumberAutoIds"],
body.hide-directory-only-elements button[title*="Renumber"] {
    display: none !important;
}

/* Hide the stats row (Total, Active, Inactive, Perf Score) in Cellular/Card view */
body.hide-directory-only-elements .stats-row {
    display: none !important;
}

/* Hide the duplicate "Search cellular view..." search box in report view */
#reportView .report-search,
#reportView .report-header,
#reportSearchInput {
    display: none !important;
}

/* ==========================================================================
   KEEP VISIBLE IN ALL VIEWS
   New Contact and Refresh buttons should always be visible
   ========================================================================== */

/* Ensure New Contact button stays visible */
body.hide-directory-only-elements .btn-primary,
body.hide-directory-only-elements button[onclick*="showAddModal"] {
    display: inline-flex !important;
}

/* Ensure Refresh button stays visible */
body.hide-directory-only-elements .btn-outline,
body.hide-directory-only-elements button[onclick*="refreshData"] {
    display: inline-flex !important;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 768px) {
    body.hide-directory-only-elements .controls-right {
        justify-content: flex-end;
    }
}
