/* HG_V66I_KNOWN_GOOD_SIDE_MENU_STORE_RESTORE
   Based on the known-good uploaded shell CSS, with iPhone full-screen menu.
*/
/* =========================================================
   PANELS & MODALS
========================================================= */
.slide-out-panel {
    position: fixed; top: 0; right: 0; width: 100%; height: 100dvh; 
    background-color: rgba(18, 18, 18, 0.98); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    z-index: 1000; transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 0; box-sizing: border-box; 
    overflow: hidden; display: flex; flex-direction: column;
}
.slide-out-panel.open { transform: translateX(0); }
.slide-out-panel h3 { color: #FFD700; border-bottom: 1px solid #333; padding-bottom: 10px; margin: 30px 20px 0 20px; }

.fullscreen-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100dvh; 
    background: #121212; z-index: 1010; flex-direction: column; overflow-y: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior-y: none;
}

.modal-header {
    display: flex; align-items: center; padding: calc(20px + env(safe-area-inset-top)) 20px 10px;
    flex-shrink: 0; position: sticky; top: 0; background: inherit; z-index: 10;
}
.modal-header .fullscreen-back-btn {
    background: none; border: 1px solid #FFD700; color: #FFD700; border-radius: 50%;
    width: 45px; height: 45px; font-size: 1.2em; cursor: pointer; display: flex;
    align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.2s, background 0.2s;
}
.modal-header .fullscreen-back-btn:active { transform: scale(0.9); background: rgba(255,215,0,0.2); }
.modal-header h2 { flex: 1; text-align: center; margin: 0; color: #FFD700; font-size: 1.5em; }
.header-dummy { width: 45px; height: 45px; flex-shrink: 0; }

#focusExitContainer { position: fixed; top: calc(15px + env(safe-area-inset-top)); right: 15px; z-index: 1001; display: none; gap: 15px; }
body.fullscreen #focusExitContainer { display: flex; }


/* =========================================================
   BEAUTIFIED SIDE MENU (HUD DASHBOARD)
========================================================= */
.menu-scroll-content { padding: 15px 20px 40px; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 20px; }

/* --- HUD LAYOUT STYLES --- */
.hud-box { 
    background: linear-gradient(145deg, rgba(30, 25, 15, 0.8), rgba(15, 10, 5, 0.9));
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(255, 215, 0, 0.05);
    display: flex; flex-direction: column; gap: 15px; 
}
.hud-user-row { 
    display: flex; align-items: center; gap: 15px; 
    border-bottom: 1px solid rgba(255, 215, 0, 0.15); 
    padding-bottom: 15px; 
}
.hud-action-row { 
    display: flex; justify-content: space-between; align-items: center; 
    background: rgba(0, 0, 0, 0.4); border: 1px solid rgba(255, 215, 0, 0.15); 
    border-radius: 12px; padding: 12px 20px; box-shadow: inset 0 2px 10px rgba(0,0,0,0.5); 
}
.hud-icon-btn { 
    background: rgba(255, 215, 0, 0.05); border: 1px solid rgba(255, 215, 0, 0.25); color: #FFD700; 
    border-radius: 14px; width: 48px; height: 48px; display: flex; justify-content: center; 
    align-items: center; font-size: 1.3em; cursor: pointer; transition: all 0.2s ease; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); 
}
.hud-icon-btn:hover, .hud-icon-btn:active { 
    background: rgba(255, 215, 0, 0.15); border-color: #FFD700; color: #FFD700; 
    transform: translateY(-2px); box-shadow: 0 6px 15px rgba(255, 215, 0, 0.2); 
}

/* --- NAVIGATION LINKS --- */
.hud-links-list { 
    display: flex; flex-direction: column; 
    background: rgba(30, 30, 35, 0.5); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: 18px; 
    overflow: hidden; 
    margin-top: 5px; 
    z-index: 10; 
    position: relative; 
    transform: translateZ(0); 
    -webkit-transform: translateZ(0);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    isolation: isolate;
}
.hud-link-item { 
    background: transparent; border: none; color: #fff; 
    font-weight: 800; font-size: 0.95em; letter-spacing: 1px; 
    padding: 18px 20px; text-align: left; cursor: pointer; 
    display: flex; align-items: center; justify-content: space-between; 
    transition: background 0.2s, padding-left 0.2s; 
}
.hud-link-item:active { 
    background: rgba(255, 215, 0, 0.1); 
    color: #FFD700; 
}
.hud-divider { 
    height: 1px; 
    background: rgba(255, 255, 255, 0.05); 
    margin: 0 15px; 
}


/* HG V66I iPhone side menu full-screen + safe scroll */
@media (max-width: 700px) {
  #settingsPanel.slide-out-panel,
  #settingsPanel,
  .slide-out-panel {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    min-height: 100dvh !important;
    transform: translateX(100%) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    padding: 0 !important;
  }

  #settingsPanel.slide-out-panel.open,
  #settingsPanel.open,
  .slide-out-panel.open {
    transform: translateX(0) !important;
  }

  #settingsPanel .modal-header {
    flex-shrink: 0 !important;
  }

  #settingsPanel .menu-scroll-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
    padding: 15px 20px calc(40px + env(safe-area-inset-bottom)) !important;
    gap: 20px !important;
  }

  #settingsPanel .hud-link-item {
    width: 100% !important;
    min-height: 56px !important;
    padding: 18px 20px !important;
    box-sizing: border-box !important;
  }
}

/* Keep phone notification out of HUD/sidebar */
#settingsPanel #hgV66AEnablePushBtn,
#settingsPanel #hgV66BEnablePushBtn,
#settingsPanel #hgV66DEnablePushBtn,
#settingsPanel #hgV66GAppSettingsNotificationSection,
#settingsPanel [id*="EnablePushBtn"] {
  display: none !important;
}
