/* =========================================================
   Mobile Footer Menu – Frontend Styles
   ========================================================= */

:root {
  --mfm-bg:         rgba(255,255,255,0.75);
  --mfm-blur:       14px;
  --mfm-border:     rgba(255,255,255,0.6);
  --mfm-active:     #C0604A;
  --mfm-text:       #888;
  --mfm-fab:        #C0604A;
  --mfm-height:     70px;
  --mfm-radius:     22px;
  --mfm-shadow:     0 -4px 30px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --mfm-transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---- Hide on desktop ---- 
@media (min-width: calc(var(--mfm-breakpoint) + 1px)) {
  .mfm-nav { display: none !important; }
}*/

@media (min-width: 768px) {
    .mfm-nav {
        display: none !important;
    }
}

/* ---- Main bar ---- */
.mfm-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  padding: 0 8px env(safe-area-inset-bottom, 8px);
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.mfm-nav.mfm-hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

/* ---- Inner glass pill ---- */
.mfm-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: var(--mfm-height);
  background: var(--mfm-bg);
  backdrop-filter: blur(var(--mfm-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--mfm-blur)) saturate(180%);
  border: 1.5px solid var(--mfm-border);
  border-radius: var(--mfm-radius);
  box-shadow: var(--mfm-shadow);
  padding: 0 12px;
  margin-bottom: 8px;
  position: relative;
}

/* ---- Menu item ---- */
.mfm-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  text-decoration: none;
  color: var(--mfm-text);
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  transition: color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

.mfm-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  transition: transform var(--mfm-transition), background 0.25s ease;
}

.mfm-item.mfm-active .mfm-icon-wrap {
  background: color-mix(in srgb, var(--mfm-active) 12%, transparent);
}

.mfm-item svg {
  transition: stroke 0.25s ease, transform var(--mfm-transition);
  will-change: transform;
}

.mfm-item.mfm-active {
  color: var(--mfm-active);
}

.mfm-item.mfm-active svg {
  stroke: var(--mfm-active);
}

/* Active indicator dot */
.mfm-item.mfm-active::after {
  content: '';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--mfm-active);
  opacity: 0.7;
}

/* ---- Label ---- */
.mfm-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.25s ease;
  font-family: iransansxv;
}

/* ---- Badge ---- */
.mfm-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--mfm-active);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* ---- Ripple ---- */
.mfm-ripple,
.mfm-fab-ripple {
  position: absolute;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  background: var(--mfm-active);
  opacity: 0;
  transform: scale(0);
  pointer-events: none;
  left: 50%;
  top: 50%;
  margin-left: -30px;
  margin-top: -30px;
}

.mfm-ripple.mfm-animate,
.mfm-fab-ripple.mfm-animate {
  animation: mfmRipple 0.55s ease-out forwards;
}

@keyframes mfmRipple {
  0%   { transform: scale(0); opacity: 0.35; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* ---- Click bounce ---- */
.mfm-bounce .mfm-icon-wrap {
  animation: mfmBounce 0.45s var(--mfm-transition);
}

@keyframes mfmBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.78); }
  70%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ---- FAB ---- */
.mfm-fab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  margin: 0 6px;
  margin-top: -28px;
  z-index: 2;
}

.mfm-fab-inner {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--mfm-fab);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 20px color-mix(in srgb, var(--mfm-fab) 55%, transparent),
    0 2px 6px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.2);
  color: #fff;
  transition: transform var(--mfm-transition), box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.mfm-fab-inner svg {
  stroke: #fff;
  fill: none;
}

.mfm-fab:active .mfm-fab-inner,
.mfm-fab.mfm-pressed .mfm-fab-inner {
  transform: scale(0.92);
  box-shadow:
    0 3px 10px color-mix(in srgb, var(--mfm-fab) 40%, transparent),
    0 1px 3px rgba(0,0,0,0.1);
}

.mfm-fab-ripple {
  background: rgba(255,255,255,0.6);
  width: 58px;
  height: 58px;
  margin-left: -29px;
  margin-top: -29px;
}

/* ===================================================
   Template Variants
   =================================================== */

/* Dark Glass */
.mfm-template-dark_glass .mfm-inner {
  background: var(--mfm-bg);
}
.mfm-template-dark_glass .mfm-item.mfm-active .mfm-icon-wrap {
  background: color-mix(in srgb, var(--mfm-active) 20%, transparent);
}

/* Cream Classic */
.mfm-template-cream .mfm-inner {
  border-radius: 18px;
  box-shadow: 0 -2px 20px rgba(100,70,50,0.10);
}

/* Minimal White */
.mfm-template-minimal_white .mfm-inner {
  border-radius: 16px;
  border-width: 1px;
  backdrop-filter: blur(var(--mfm-blur));
  -webkit-backdrop-filter: blur(var(--mfm-blur));
}
.mfm-template-minimal_white .mfm-item.mfm-active::after {
  display: none;
}
.mfm-template-minimal_white .mfm-item.mfm-active .mfm-label {
  font-weight: 700;
}

/* ===================================================
   Reduced Motion
   =================================================== */
@media (prefers-reduced-motion: reduce) {
  .mfm-ripple, .mfm-fab-ripple { display: none; }
  .mfm-bounce .mfm-icon-wrap   { animation: none; }
  .mfm-nav { transition: none; }
}
