/* ============================================================
   Mega Menu MFE — Pure Custom CSS (No Tailwind)
   All styles are scoped to .mm-* classes.
   Fonts are loaded with absolute URLs for Shadow DOM compatibility.
   ============================================================ */

/* thin */
@font-face {
  font-family: 'Gilroy';
  font-weight: 100;
  src: local('Gilroy'), url(http://localhost:5001/assets/fonts/Gilroy-Thin.ttf) format('truetype');
}

/* ultra thin */
@font-face {
  font-family: 'Gilroy';
  font-weight: 200;
  src: local('Gilroy'), url(http://localhost:5001/assets/fonts/Gilroy-UltraLight.ttf) format('truetype');
}

/* light */
@font-face {
  font-family: 'Gilroy';
  font-weight: 300;
  src: local('Gilroy'), url(http://localhost:5001/assets/fonts/Gilroy-Light.ttf) format('truetype');
}

/* regular */
@font-face {
  font-family: 'Gilroy';
  font-weight: 400;
  src: local('Gilroy'), url(http://localhost:5001/assets/fonts/Gilroy-Regular.ttf) format('truetype');
}

/* medium */
@font-face {
  font-family: 'Gilroy';
  font-weight: 500;
  src: local('Gilroy'), url(http://localhost:5001/assets/fonts/Gilroy-Medium.ttf) format('truetype');
}

/* semibold */
@font-face {
  font-family: 'Gilroy';
  font-weight: 600;
  src: local('Gilroy'), url(http://localhost:5001/assets/fonts/Gilroy-SemiBold.ttf) format('truetype');
}

/* bold */
@font-face {
  font-family: 'Gilroy';
  font-weight: 700;
  src: local('Gilroy'), url(http://localhost:5001/assets/fonts/Gilroy-Bold.ttf) format('truetype');
}

/* extra bold */
@font-face {
  font-family: 'Gilroy';
  font-weight: 800;
  src: local('Gilroy'), url(http://localhost:5001/assets/fonts/Gilroy-ExtraBold.ttf) format('truetype');
}

/* black */
@font-face {
  font-family: 'Gilroy';
  font-weight: 900;
  src: local('Gilroy'), url(http://localhost:5001/assets/fonts/Gilroy-Black.ttf) format('truetype');
}

/* heavy */
@font-face {
  font-family: 'Gilroy';
  font-weight: 900;
  src: local('Gilroy'), url(http://localhost:5001/assets/fonts/Gilroy-Heavy.ttf) format('truetype');
}

/* ============================================================
   Base Reset & Box Model
   ============================================================ */
.mm-overlay,
.mm-overlay *,
.mm-overlay *::before,
.mm-overlay *::after {
  box-sizing: border-box;
}

/* ============================================================
   Animations & Transitions
   ============================================================ */
/* ============================================================
   Reset — scoped only inside our components
   ============================================================ */
.mm-overlay,
.mm-overlay * {
  font-family: 'Gilroy', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.mm-overlay button {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* ============================================================
   Overlay + Backdrop
   ============================================================ */
.mm-overlay {
  position: fixed;
  inset: 0;
  top: 62px;
  z-index: 1000;
  pointer-events: auto;
  font-family: 'Gilroy', system-ui, -apple-system, sans-serif;
}

.mm-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* ============================================================
   Menu Card
   ============================================================ */
.mm-card {
  position: absolute;
  top: 8px;
  right: 40px;
  width: 900px;
  height: auto;
  /* Let the content define the natural height */
  min-height: 400px;
  /* Provides a nice minimum grounding */
  max-height: calc(100vh - 100px);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #f1f5f9;
  overflow: hidden;
  display: flex;
  animation: mm-slidein 0.2s ease;
  font-family: 'Gilroy', system-ui, -apple-system, sans-serif;
}

@keyframes mm-slidein {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   Sidebar (Left Panel)
   ============================================================ */
.mm-sidebar {
  width: 440px;
  min-width: 440px;
  border-right: 1px solid #f1f5f9;
  overflow-y: auto;
  background-color: rgba(248, 250, 252, 0.5);
}

.mm-sidebar__inner {
  padding: 32px;
}

.mm-sidebar__title {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 24px 0;
  padding: 0;
  margin-top: 9px;
}

/* ============================================================
   Search Bar
   ============================================================ */
.mm-search-wrap {
  position: relative;
  margin-bottom: 24px;
}

.mm-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  display: block;
}

.mm-search__input {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px 12px 40px;
  font-size: 14px;
  color: #1e293b;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
  box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;
}

.mm-search__input:focus {
  border-color: #d8b4fe;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.mm-search__input::placeholder {
  color: #94a3b8;
}

/* ============================================================
   Module List
   ============================================================ */
.mm-module-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mm-module-list__label {
  padding: 0 16px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  margin: 0 0 12px 0;
}

.mm-module-btn {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  /* Keeps layout completely static */
  outline: none;
  background: transparent;
  text-align: left;
  transition: all 0.1s ease;
}

.mm-module-btn:hover {
  background: #ffffff;
  box-shadow:
    0 0 0 1px #e2e8f0,
    0 4px 6px rgba(0, 0, 0, 0.1);
  /* Extremely subtle */
}

.mm-module-btn--active {
  background: #ffffff;
  /* perfectly replicates Tailwind's shadow-md ring-1 ring-slate-100 without being black */
  /* box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.04), 0 0 0 1px #f1f5f9; */
  /* box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 1px 3px 0 #0000001a, 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a; */
  box-shadow:
    0 0 0 1px #e2e8f0,
    0 4px 6px rgba(0, 0, 0, 0.1);
}

.mm-module-btn__icon {
  margin-top: 2px;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mm-module-btn__body {
  flex: 1;
  min-width: 0;
}

.mm-module-btn__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mm-module-btn__title {
  font-weight: 700;
  font-size: 15px;
  color: #1e293b;
  margin: 0;
  padding: 0;
}

.mm-module-btn__chevron {
  color: #94a3b8;
  flex-shrink: 0;
}

.mm-module-btn__desc {
  font-size: 12px;
  color: #64748b;
  margin: 4px 0 0 0;
  line-height: 1.625;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   Icon colour modifiers
   ============================================================ */
.mm-icon-bg--purple {
  background-color: #f5f3ff;
}

.mm-icon-bg--blue {
  background-color: #eff6ff;
}

.mm-icon-bg--indigo {
  background-color: #eef2ff;
}

.mm-icon-bg--pink {
  background-color: #fdf2f8;
}

.mm-icon-bg--orange {
  background-color: #fff7ed;
}

.mm-icon--purple {
  color: #9333ea;
  display: contents;
}

.mm-icon--blue {
  color: #2563eb;
  display: contents;
}

.mm-icon--indigo {
  color: #4f46e5;
  display: contents;
}

.mm-icon--pink {
  color: #db2777;
  display: contents;
}

.mm-icon--orange {
  color: #ea580c;
  display: contents;
}

/* ============================================================
   Right Panel
   ============================================================ */
.mm-panel {
  flex: 1;
  background: #ffffff;
  padding: 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mm-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.mm-panel__title {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  padding: 0;
}

.mm-panel__badge {
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.mm-panel__badge--sales {
  background: #f5f3ff;
  color: #7c3aed;
}

.mm-panel__badge--purchase {
  background: #eff6ff;
  color: #1d4ed8;
}

.mm-panel__badge--expense {
  background: #eef2ff;
  color: #4338ca;
}

.mm-panel__badge--hrms {
  background: #fdf2f8;
  color: #be185d;
}

.mm-panel__badge--crm {
  background: #fff7ed;
  color: #c2410c;
}

/* ============================================================
   Action Buttons
   ============================================================ */
.mm-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.mm-action-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 16px;
  /* replicate shadow-sm transparent border natively */
  border: 1px solid transparent;
  background: transparent;
  /* box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); */
  /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); */
  box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;
  text-align: left;
  width: 100%;
  transition: all 0.1s ease;
}

.mm-action-btn:hover {
  background: #f8fafc;
  border-color: #f1f5f9;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
}

.mm-action-btn:hover .mm-action-btn__icon {
  background: #ffffff;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}

.mm-action-btn:hover .mm-action-btn__label {
  color: #9333ea;
}

.mm-action-btn:hover .mm-action-btn__plus {
  color: #a855f7;
  transform: scale(1.1);
}

.mm-action-btn__icon {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  flex-shrink: 0;
  transition: all 0.15s;
}

.mm-action-btn__body {
  flex: 1;
  min-width: 0;
}

.mm-action-btn__label {
  font-weight: 700;
  color: #1e293b;
  font-size: 15px;
  margin: 0;
  padding: 0;
  transition: color 0.15s;
}

.mm-action-btn__sub {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 0 0;
  padding: 0;
}

.mm-action-btn__plus {
  color: #cbd5e1;
  margin-left: auto;
  flex-shrink: 0;
  transition: color 0.15s, transform 0.15s;
}

/* ============================================================
   Insight Card
   ============================================================ */
.mm-insight {
  margin-top: 48px;
  background: #f8fafc;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #f1f5f9;
}

.mm-insight__title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mm-insight__icon {
  color: #a855f7;
}

.mm-insight__body {
  font-size: 12px;
  color: #64748b;
  line-height: 1.625;
  margin: 0;
}

.mm-insight__highlight {
  color: #9333ea;
  font-weight: 600;
}

.mm-insight__link {
  margin-top: 16px;
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 700;
  color: #9333ea;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  transition: gap 0.15s;
}

.mm-insight__link:hover {
  gap: 8px;
}


/* TEST */