/**
 * HVAC Page Templates - Global Styles
 * Ensures consistent layout for all HVAC plugin pages
 */

/* Hide sidebars on all HVAC pages */
.hvac-page .widget-area,
.hvac-page .sidebar,
.hvac-page #secondary,
.hvac-page aside.widget-area,
.hvac-community-events .widget-area,
.hvac-community-events .sidebar,
.hvac-community-events #secondary,
.hvac-community-events aside.widget-area {
    display: none !important;
}

/* Full width layout for HVAC pages */
.hvac-page #primary,
.hvac-page .content-area,
.hvac-page .site-main,
.hvac-page main,
.hvac-community-events #primary,
.hvac-community-events .content-area,
.hvac-community-events .site-main,
.hvac-community-events main {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto;
}

/* Ensure content wrapper spans full width */
.hvac-page-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Container styles for consistent spacing */
.hvac-page-wrapper .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Remove default page title since we handle it in our templates */
.hvac-page .entry-title,
.hvac-community-events .entry-title {
    display: none !important;
}

/* ===== MASTER TRAINER SINGLE-COLUMN LAYOUT FIXES ===== */

/* Force single-column layouts on all Master Trainer pages */
.hvac-master-google-sheets-page .sync-options,
.hvac-master-announcements-page .hvac-grid-2,
.hvac-master-announcements-page .hvac-grid-3,
.hvac-master-announcements-page .hvac-grid-4,
.hvac-master-pending-approvals-page .hvac-grid-2,
.hvac-master-pending-approvals-page .hvac-grid-3,
.hvac-master-pending-approvals-page .hvac-grid-4,
.hvac-master-trainers-page .hvac-grid-2,
.hvac-master-trainers-page .hvac-grid-3,
.hvac-master-trainers-page .hvac-grid-4,
.hvac-master-trainers-page .hvac-stats-tiles,
.hvac-master-trainers-page .hvac-trainers-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: var(--hvac-space-6, 1.5rem);
}

/* Google Sheets specific fixes */
.hvac-master-google-sheets-page .sync-options {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--hvac-space-6, 1.5rem);
}

.hvac-master-google-sheets-page .sync-card {
    width: 100% !important;
    max-width: none !important;
    display: block !important;
    margin-bottom: var(--hvac-space-4, 1rem);
    background: var(--hvac-neutral-0, #ffffff);
    border: 1px solid var(--hvac-neutral-200, #e5e7eb);
    border-radius: var(--hvac-space-2, 0.5rem);
    padding: var(--hvac-space-6, 1.5rem);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.hvac-master-google-sheets-page .template-list,
.hvac-master-google-sheets-page .template-item {
    display: block !important;
    width: 100% !important;
    margin-bottom: var(--hvac-space-4, 1rem) !important;
}

/* Announcements page single-column fixes */
.hvac-master-announcements-page .hvac-announcements-timeline .timeline-wrapper {
    display: block !important;
    max-width: 100%;
}

/* Pending approvals page single-column fixes */
.hvac-master-pending-approvals-page .hvac-approval-cards,
.hvac-master-pending-approvals-page .hvac-pending-items {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: var(--hvac-space-4, 1rem);
}

/* Trainers page single-column fixes */
.hvac-master-trainers-page .hvac-trainer-cards,
.hvac-master-trainers-page .hvac-trainer-grid,
.hvac-master-trainers-page .hvac-trainers-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: var(--hvac-space-4, 1rem);
}

/* Ensure navigation and breadcrumbs are visible */
.hvac-master-google-sheets-page .hvac-trainer-menu-wrapper,
.hvac-master-announcements-page .hvac-trainer-menu-wrapper,
.hvac-master-pending-approvals-page .hvac-trainer-menu-wrapper,
.hvac-master-trainers-page .hvac-trainer-menu-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: var(--hvac-space-6, 1.5rem);
}

/* Breadcrumbs visibility fix */
.hvac-master-google-sheets-page .hvac-breadcrumbs,
.hvac-master-announcements-page .hvac-breadcrumbs,
.hvac-master-pending-approvals-page .hvac-breadcrumbs,
.hvac-master-trainers-page .hvac-breadcrumbs {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: var(--hvac-space-4, 1rem);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hvac-page-wrapper {
        padding: 20px 15px;
    }
    
    .hvac-page-wrapper .container {
        padding: 0 15px;
    }
    
    /* Ensure Master Trainer pages remain single-column on mobile */
    .hvac-master-google-sheets-page .sync-options,
    .hvac-master-announcements-page .hvac-grid-2,
    .hvac-master-announcements-page .hvac-grid-3,
    .hvac-master-announcements-page .hvac-grid-4,
    .hvac-master-pending-approvals-page .hvac-grid-2,
    .hvac-master-pending-approvals-page .hvac-grid-3,
    .hvac-master-pending-approvals-page .hvac-grid-4,
    .hvac-master-trainers-page .hvac-grid-2,
    .hvac-master-trainers-page .hvac-grid-3,
    .hvac-master-trainers-page .hvac-grid-4 {
        grid-template-columns: 1fr !important;
        gap: var(--hvac-space-4, 1rem);
    }
}