/* Mobile Footer Navigation - Bottom Tab Bar
   Modern iOS/Android style navigation
   Only visible on mobile devices < 768px
*/

/* Hide mobile footer on desktop by default */
.mobile-footer {
  display: none !important;
}

/* Show mobile footer only on mobile devices */
@media (max-width: 767px) {
  
  .mobile-footer {
    display: block !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .mobile-footer__container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px 0;
    max-width: 100%;
    position: relative;
  }

  /* Navigation Items */
  .mobile-footer__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 12px;
    position: relative;
    flex: 1;
    max-width: 80px;
  }

  .mobile-footer__item--disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  /* Primary Item (Hem - Large center button) */
  .mobile-footer__item--primary {
    flex: 0 0 auto;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-4px);
  }

  .mobile-footer__item--primary:active {
    transform: translateY(-2px);
  }

  /* Active State */
  .mobile-footer__item--active {
    color: #3b82f6;
  }

  .mobile-footer__item--primary.mobile-footer__item--active {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  }

  /* Icon Wrapper */
  .mobile-footer__icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
  }

  .mobile-footer__icon-wrapper--large {
    margin-bottom: 2px;
  }

  /* Icons */
  .mobile-footer__icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
  }

  .mobile-footer__icon--large {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
  }

  /* Avatar (for profile) */
  .mobile-footer__avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid currentColor;
  }

  /* Labels */
  .mobile-footer__label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1;
  }

  /* Badge (notifications/messages count) */
  .mobile-footer__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    padding: 0 5px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }

  /* Adjust main content to not be hidden by footer */
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0));
  }

  /* Remove extra padding from layout since we have mobile header AND footer */
  .layout {
    padding-top: 65px !important;
    padding-bottom: 0 !important;
  }

  /* Hover/Active states (for devices that support hover) */
  @media (hover: hover) {
    .mobile-footer__item:not(.mobile-footer__item--disabled):hover {
      background: #f3f4f6;
    }

    .mobile-footer__item--primary:hover {
      background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
      box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
    }
  }

  /* Active press state */
  .mobile-footer__item:active:not(.mobile-footer__item--disabled) {
    transform: scale(0.95);
  }

  .mobile-footer__item--primary:active {
    transform: translateY(-2px) scale(0.95);
  }

}
