/*
Theme Name: Atomware
Theme URI: https://atomware.co.za
Author: Atomware
Author URI: https://atomware.co.za
Description: Minimal full-width theme for Atomware. No bloat—just full-width pages by default. Elementor compatible.
Version: 1.0.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: atomware
*/

/* Reset & base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Full width by default */
html {
    height: 100%;
}

.site {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.site-content {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/*
 * Atomware plugin shells (standalone theme — no Elementor required).
 * The dashboards use fixed full-viewport overlays; wrappers must not clip
 * or constrain height so chat panes scroll inside the shell.
 */
body.atomware-full-width {
    min-height: 100%;
    min-height: 100dvh;
}

body:has(#atomware-staff-dashboard),
body:has(#atomware-client-portal) {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    box-sizing: border-box;
}

.site:has(#atomware-staff-dashboard),
.site:has(#atomware-client-portal),
.site-content:has(#atomware-staff-dashboard),
.site-content:has(#atomware-client-portal) {
    /* Plugin shells (#atomware-staff-dashboard / #atomware-client-portal) are position:fixed and fill
       the viewport internally. Forcing wrappers to min-height:100dvh duplicates the viewport in the
       flow and can interfere with nested flex/grid height (dead band inside Group Chat / chat panes).
       Keep wrappers neutral; the fixed shell paints the viewport. */
    min-height: 0 !important;
    height: auto !important;
    width: 100%;
    padding: 0 !important;
}

/* Stretch the main grid column inside the fixed staff shell — safe belt when theme loads after plugin. */
#atomware-staff-dashboard.atomware-dashboard > .atomware-main {
    align-self: stretch;
    min-height: 0;
    height: 100%;
}

/* Plugin already toggles staff-tab-is-chats via JS — mirror chats tab-content flex chain from theme layer. */
#atomware-staff-dashboard.staff-tab-is-chats .atomware-main > .atomware-tab-content {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.entry-content,
.entry-header {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Elementor full width */
.elementor-page .elementor,
.elementor-page .elementor-section.elementor-section-boxed > .elementor-container {
    max-width: none !important;
}

.elementor-page .site-content {
    padding: 0;
}
