/* dashboard.css */
@layer tokens, layout, components, utilities;

/* ================================================ */
/* == EXPORT TOKENS (variables)                  == */
/* ================================================ */
@import url("./style/e3colors.css") layer(tokens);
@import url("./style/e3fonts.css" ) layer(tokens);
@import url("./style/e3shapes.css") layer(tokens);

/* ================================================ */
/* == EXPORT LAYOUT                              == */
/* ================================================ */
@import url("./layouts/e3layout.sections.css" ) layer(layout);
@import url("./layouts/e3layout.blocks.css"   ) layer(layout);
@import url("./layouts/e3layout.selectors.css") layer(layout);

/* ================================================ */
/* == EXPORT COMPONENTS                          == */
/* ================================================ */
@import url("./layouts/e3header.css")        layer(components);
@import url("./layouts/e3footer.css")        layer(components);
@import url("./indicators/indicators.css")   layer(components);

/* ================================================ */
/* == EXPORT UTILITIES                           == */
/* ================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin : 0;
}

body {
  display       : flex;
  flex-direction: column;
  background    : var(--e3-cream);
  padding       : var(--space-xl) var(--space-xl);
  font-family   : var(--font-family);
  color         : var(--font-color);
  font-size     : var(--font-size);
  font-weight   : var(--font-weight);
  letter-spacing: var(--font-x-spacing);
  line-height   : var(--font-y-spacing);
  min-height    : 100dvh;
}

@media (max-width: 600px) {
  body {
    padding: 0 10px;
  }
}

/* ================================================ */
/* == LOADING OVERLAY                            == */
/* ================================================ */
#e3-loader {
  position       : fixed;
  inset          : 0;
  z-index        : 10000;
  background     : var(--e3-cream);
  display        : flex;
  align-items    : center;
  justify-content: center;
  transition     : opacity 0.5s var(--ease-standard), visibility 0.5s var(--ease-standard);
}

#e3-loader.e3-loader--hidden {
  opacity   : 0;
  visibility: hidden;
}

.e3-loader-inner {
  display        : flex;
  flex-direction : column;
  align-items    : center;
  gap            : var(--space-lg);
}

.e3-loader-logo {
  width : 100px;
  height: 100px;
}

.e3-loader-dots {
  display: flex;
  gap    : 6px;
}

.e3-loader-dot {
  width        : 5px;
  height       : 5px;
  border-radius: 50%;
  background   : var(--e3-grey3);
  animation    : e3DotPulse 3s ease-in-out infinite;
}
.e3-loader-dot:nth-child(2) { animation-delay: 0.5s; }
.e3-loader-dot:nth-child(3) { animation-delay: 1s; }

@keyframes e3DotPulse {
  0%, 70%, 100% { opacity: 0.2; transform: scale(0.75); }
  35%           { opacity: 1;   transform: scale(1);    }
}

/* ================================================ */
/* == ANIMATIONS                                 == */
/* ================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.dashboard-fadein {
  opacity        : 0;
  animation      : fadeInUp var(--fadeInUp-animation-duration) var(--ease-standard) forwards;
  animation-delay: 0.4s;
}

/* ================================================ */
/* == ACCESSIBILITY                              == */
/* ================================================ */
@media (prefers-reduced-motion: reduce) {
  .dashboard-fadein {
    animation : none !important;
    transition: none !important;
    transform : none !important;
  }
  .e3-loader-dot {
    animation: none;
    opacity  : 0.5;
  }
}