/* =========================================================
   RedPhinx Lyrics - Mobile Flyout Menu
   Separate override file - does not modify your main CSS
   ========================================================= */

@media (max-width: 900px) {

  /* Prevent page scroll while drawer is open */
  body.mobile-menu-open {
    overflow: hidden;
  }

  /* Smaller, clean burger button - no dark background */
  .menu-toggle {
    display: inline-flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;

    width: 32px !important;
    height: 32px !important;
    margin-left: auto;

    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;

    cursor: pointer;
    position: relative;
    z-index: 1003;

    -webkit-tap-highlight-color: transparent;
  }

  .menu-toggle span {
    display: block;
    width: 21px;
    height: 2px;
    margin: 0 !important;

    border-radius: 999px;
    background: #e31b23 !important;

    transition:
      transform .25s ease,
      opacity .2s ease,
      width .25s ease;
  }

  .menu-toggle span:nth-child(2) {
    width: 16px;
    align-self: flex-end;
    margin-right: 5px !important;
  }

  /* Keep burger subtle when menu is open */
  .menu-toggle.open {
    opacity: 0;
    pointer-events: none;
  }

  /* Darkened page overlay */
  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;

    background: rgba(0, 0, 0, .56);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
      opacity .28s ease,
      visibility .28s ease;
  }

  .mobile-menu-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Right-side drawer */
  #mainNav {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: 0;

    width: min(84vw, 340px);
    height: 100dvh;

    z-index: 1002;

    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0 !important;

    padding: 0 22px 28px !important;
    margin: 0 !important;

    background:
      radial-gradient(circle at top right, rgba(227, 27, 35, .11), transparent 35%),
      #0b0d10 !important;

    border-left: 1px solid rgba(255, 255, 255, .07);

    box-shadow: -20px 0 45px rgba(0, 0, 0, .35);

    transform: translateX(105%);
    visibility: hidden;

    overflow-y: auto;
    overscroll-behavior: contain;

    transition:
      transform .32s cubic-bezier(.22, .8, .25, 1),
      visibility .32s ease;
  }

  #mainNav.open {
    transform: translateX(0);
    visibility: visible;
  }

  /* Drawer header */
  .mobile-menu-top {
    min-height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 10px;

    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }

  .mobile-menu-top > span {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
  }

  /* Close icon */
  .mobile-menu-close {
    width: 34px;
    height: 34px;

    position: relative;

    border: 0;
    background: transparent;
    padding: 0;

    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-menu-close span {
    position: absolute;
    left: 7px;
    top: 16px;

    width: 20px;
    height: 2px;

    border-radius: 999px;
    background: #e31b23;
  }

  .mobile-menu-close span:first-child {
    transform: rotate(45deg);
  }

  .mobile-menu-close span:last-child {
    transform: rotate(-45deg);
  }

  /* Navigation links */
  #mainNav > a {
    position: relative;

    display: flex !important;
    align-items: center;

    min-height: 54px;
    padding: 0 4px !important;
    margin: 0 !important;

    color: #f3f3f3 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;

    border-bottom: 1px solid rgba(255, 255, 255, .07);

    transition:
      color .2s ease,
      padding-left .2s ease,
      background .2s ease;
  }

  #mainNav > a::after {
    content: "";
    position: absolute;
    right: 4px;

    width: 7px;
    height: 7px;

    border-top: 1.5px solid rgba(255,255,255,.55);
    border-right: 1.5px solid rgba(255,255,255,.55);

    transform: rotate(45deg);
  }

  #mainNav > a:hover,
  #mainNav > a:focus-visible {
    color: #e31b23 !important;
    padding-left: 10px !important;
  }

  /* Mobile CTA inside drawer */
  #mainNav .mobile-submit {
    margin-top: 20px !important;
    min-height: 48px;

    justify-content: center;

    border: 0 !important;
    border-radius: 10px;

    background: #e31b23 !important;
    color: #fff !important;

    font-size: 15px !important;
    font-weight: 700 !important;
  }

  #mainNav .mobile-submit::after {
    display: none;
  }

  #mainNav .mobile-submit:hover,
  #mainNav .mobile-submit:focus-visible {
    padding-left: 4px !important;
    color: #fff !important;
    background: #c9151c !important;
  }

  /* Hide desktop header submit button on mobile */
  .header-submit {
    display: none !important;
  }

  /* Utility */
  .desktop-hide {
    display: flex !important;
  }
}


/* Desktop: preserve existing navigation */
@media (min-width: 901px) {

  .mobile-menu-overlay,
  .mobile-menu-top,
  .mobile-submit {
    display: none !important;
  }

  .menu-toggle {
    display: none !important;
  }

  #mainNav {
    transform: none !important;
    visibility: visible !important;
  }
}