﻿/* ==========================================================================
   PAGE LAYOUT: Split Panel - Right Form
   File:        /_templates/_pages/split_panel/page.css
   Load order:  LAST (after webforms.core.css and theme.css)
   Purpose:     Page-level structure only: body, split-panel columns, logo,
                title, header/footer content. Form fields and buttons are
                styled in theme.css.
   Variables:   --app-theme-primary-color
                --app-theme-font-primary-color
                (both are defined inline on :root by CharityEngine)
   ========================================================================== */


/* ==========================================================================
   1. BASE
   ========================================================================== */

body {
    margin: 0;
}


/* ==========================================================================
   2. PAGE & APP CONTAINERS
   ========================================================================== */

#pageContainer {
    display: flex;
    flex-direction: column;
}

#ceApp-container {
    width: 100%;
    margin-inline: auto;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

#ceApp {
    display: flex;
    flex-direction: column;
}

#appContainer {
    background-color: var(--app-theme-primary-color);
}


/* ==========================================================================
   3. SPLIT PANEL (left: background image / right: form)
   < 600px:    form only (image hidden)
   600-991px:  image banner above the form (stacked)
   >= 992px:   side by side (see Responsive)
   ========================================================================== */

/* Stacked by default: a column, not a wrapping row, so spare height goes to
   the form column and can't be split into a gap above it */
#layoutContainer {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 100%;
    min-height: 90vh;
    margin-inline: auto;
}

/* Shared column behavior */
#leftColumn,
#rightColumn {
    box-sizing: border-box;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
}

#leftColumn {
    display: none;
    padding-inline: .75rem;
}

#rightColumn {
    flex: 1 0 auto; /* takes all remaining height when stacked */
    padding: 30px 5%;
    background-color: white;
}


/* ==========================================================================
   4. LOGO
   ========================================================================== */

#orgLogoContainer {
    display: block;
    width: 100%;
    text-align: center;
}

    #orgLogoContainer #orgLogo {
        max-width: 100%;
        max-height: 80px;
        height: auto;
        vertical-align: middle;
    }


/* ==========================================================================
   5. INTRO CONTENT BOX (title + header content)
   ========================================================================== */

/* Space above the box only when something inside it has content */
#layoutContentBox:has(> :not(:empty)) {
    margin-top: 20px;
}

#layoutContentBox {
    color: var(--app-theme-font-primary-color);
}

#title {
    font-size: 40px;
    font-weight: 600;
}

    /* Space below the title only when there is a title */
    #title:not(:empty) {
        margin-bottom: 10px;
    }


/* ==========================================================================
   6. FOOTER CONTENT (separate from the intro box)
   ========================================================================== */

#footerContent {
    color: var(--app-theme-font-primary-color);
}

    #footerContent:not(:empty) {
        margin-top: 20px;
    }

/* ==========================================================================
   7. SOCIAL SHARING WIDGET
   ========================================================================== */

/* Social sharing: base rules are in webforms.core.css */
#ceSocialSharingWidgetContainer {
    margin-top: 50px;
}

#ceSocialSharingWidget > div {
    margin-right: 0;
}

/* ==========================================================================
   8. RESPONSIVE
   Mobile-first: the rules above are the smallest layout.
   ========================================================================== */
/* Desktop: two equal columns side by side */
@media (min-width: 992px) {
    #layoutContainer {
        flex-direction: row;
    }

    #leftColumn,
    #rightColumn {
        flex: 0 0 auto;
        width: 50%;
    }

    #leftColumn {
        display: block;
    }
}

/* Small phones: remove app padding */
@media (max-width: 500px) {
    #ceApp {
        padding: 0;
        width: 100%;
    }
}
