/**
 * Lemon Web Tech - Mega Menu Plugin Stylesheet
 * File: assets/css/mega-menu.css
 * Fully standalone, zero theme dependencies
 */

/* ==========================================================================
   DESKTOP & LAPTOP MEGA MENU (min-width: 1024px)
   ========================================================================== */
@media (min-width: 1024px) {
  .lwt-mega-parent {
    position: relative;
    display: inline-block;
  }

  .lwt-mega-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 840px;
    max-width: 95vw;
    background: #060911;
    border: 1px solid #1e293b;
    border-radius: 1.25rem;
    padding: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
    z-index: 9999;
  }

  /* Show on hover or click active state */
  .lwt-mega-parent:hover .lwt-mega-dropdown,
  .lwt-mega-parent:focus-within .lwt-mega-dropdown,
  .lwt-mega-parent.is-active .lwt-mega-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  /* 3-Column Grid */
  .lwt-mega-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 1.25rem;
  }

  .lwt-mega-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #eab308;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .lwt-mega-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0.6rem;
    border-radius: 0.6rem;
    text-decoration: none;
    color: #e2e8f0;
    transition: background 0.15s ease, color 0.15s ease;
  }

  .lwt-mega-item:hover {
    background: #0f172a;
    color: #fde047;
  }

  .lwt-mega-item .item-icon {
    font-size: 1rem;
    line-height: 1.2;
    flex-shrink: 0;
    margin-top: 0.1rem;
  }

  .lwt-mega-item .item-title {
    font-size: 0.825rem;
    font-weight: 700;
    display: block;
    line-height: 1.2;
    color: #fff;
  }

  .lwt-mega-item:hover .item-title {
    color: #eab308;
  }

  .lwt-mega-item .item-desc {
    font-size: 0.7rem;
    color: #94a3b8;
    display: block;
    margin-top: 0.15rem;
    line-height: 1.3;
  }

  /* Marketplace Badge Links */
  .lwt-market-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    background: #0f172a;
    border: 1px solid #1e293b;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.775rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    transition: all 0.15s ease;
  }

  .lwt-market-badge:hover {
    border-color: #eab308;
    background: #141e33;
    color: #fff;
  }

  .lwt-market-badge .tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.35rem;
    font-weight: 700;
  }

  /* Tools Card in Mega Menu */
  .lwt-tools-card {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 0.875rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

/* ==========================================================================
   MOBILE & TABLET SLIDE-IN DRAWER (max-width: 1023px)
   ========================================================================== */
@media (max-width: 1023px) {
  .lwt-mega-dropdown {
    display: none !important;
  }

  .lwt-mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #060911;
    z-index: 99999;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem 1.25rem 3rem 1.25rem;
  }

  .lwt-mobile-drawer.is-open {
    display: block;
    animation: lwtDrawerSlide 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  @keyframes lwtDrawerSlide {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .lwt-mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid #1e293b;
    margin-bottom: 1rem;
  }

  .lwt-accordion-item {
    border-bottom: 1px solid #1e293b;
    padding: 0.6rem 0;
  }

  .lwt-accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.5rem 0;
    cursor: pointer;
    text-align: left;
  }

  .lwt-accordion-trigger .chevron {
    transition: transform 0.2s ease;
    font-size: 0.75rem;
    color: #94a3b8;
  }

  .lwt-accordion-item.is-expanded .lwt-accordion-trigger .chevron {
    transform: rotate(180deg);
    color: #eab308;
  }

  .lwt-accordion-content {
    display: none;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .lwt-accordion-item.is-expanded .lwt-accordion-content {
    display: block;
  }

  .lwt-mobile-sublink {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 0.85rem;
    min-height: 44px;
  }

  .lwt-mobile-sublink:active,
  .lwt-mobile-sublink:hover {
    background: #0f172a;
    color: #eab308;
  }

  .lwt-mobile-sublink .icon-box {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.4rem;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
  }
}