﻿/************************************************************************************************
 *                                                                                              *
 * Project:     Erebus | Admin Portal with OAuth to M365 Accounts                                *
 * File:        /assets/css/master.css                                                          *
 * Purpose:     Canonical master stylesheet (single linked entry point)                          *
 *                                                                                              *
 ************************************************************************************************
 *
 * Contract (Canonical):
 * - /header.php MUST link ONLY: /assets/css/master.css
 * - All other stylesheets MUST be imported from this file.
 * - Import order is intentional and should not drift:
 *     1) tokens -> base -> layout -> components
 *     2) menus.css (header menus system)
 *     3) erebus-toast.css (toast system)
 *     4) Theme transition helpers (MUST be last)
 *
 ************************************************************************************************
 *
 * @author      Christopher VanderReyden <Chris.VanderReyden@lakeshorelifestyle.co>
 * @copyright   2026 [Lakeshore Lifestyles Company, LLC]
 * @license     Apache 2.0 (https://opensource.org/licenses/Apache-2.0)
 * @version     1.1.6
 * @since       2026-01-06
 *
 ************************************************************************************************/

/* =============================================================================
   1) Core Tokens + Base
============================================================================= */

@import url("/assets/css/tokens.css");
@import url("/assets/css/base.css");

/* =============================================================================
   2) Layout + Controls + Common Components
============================================================================= */

@import url("/assets/css/layout.css");
@import url("/assets/css/controls.css");
@import url("/assets/css/forms-tables.css");
@import url("/assets/css/badges.css");
@import url("/assets/css/pills.css");

/* Global message handler (querystring notices) */
@import url("/assets/css/msg-handler.css");

/* NOTE:
   - ToDo CSS has been merged into the app-specific CSS and is not imported here.
   - App-specific CSS should be imported by the app loader or its own bundling strategy. */

@import url("/assets/css/drag.css");
@import url("/assets/css/svcs.css");
@import url("/assets/css/apps.css");
@import url("/assets/css/elements.css");
@import url("/assets/css/admin.css");
@import url("/assets/css/audit.css");
@import url("/assets/css/profile.css");
@import url("/assets/css/files.css");

/* =============================================================================
   3) Menus + Toast (existing systems)
============================================================================= */

@import url("/assets/css/menus.css");

/* Dev Mode MUST load after menus.css so menus cannot override it. */
@import url("/assets/css/devmode.css");

@import url("/assets/css/erebus-toast.css");

/* =============================================================================
   4) Theme Transition Helpers (must be LAST in master.css)
============================================================================= */

html.theme-fade *{
  transition:
    background-color 380ms cubic-bezier(.4, 0, .2, 1),
    color 380ms cubic-bezier(.4, 0, .2, 1),
    border-color 380ms cubic-bezier(.4, 0, .2, 1),
    box-shadow 380ms cubic-bezier(.4, 0, .2, 1),
    fill 380ms cubic-bezier(.4, 0, .2, 1),
    stroke 380ms cubic-bezier(.4, 0, .2, 1);
}

html.theme-fade body,
html.theme-fade .panel,
html.theme-fade .card,
html.theme-fade table,
html.theme-fade input,
html.theme-fade select,
html.theme-fade textarea,
html.theme-fade button,
html.theme-fade a{
  transition:
    background-color 380ms cubic-bezier(.4, 0, .2, 1),
    color 380ms cubic-bezier(.4, 0, .2, 1),
    border-color 380ms cubic-bezier(.4, 0, .2, 1),
    box-shadow 380ms cubic-bezier(.4, 0, .2, 1),
    fill 380ms cubic-bezier(.4, 0, .2, 1),
    stroke 380ms cubic-bezier(.4, 0, .2, 1);
}

html.no-transitions *{ transition:none !important; }

@media (prefers-reduced-motion: reduce){
  html.theme-fade *{ transition:none !important; }
}

/* Centers the warning block within the viewport width, but stays in normal flow */
.centered-view{
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 16px 0;
}
