/* 1. ANCHOR THE EDIT MENU
   Setting position:relative on the main container ensures that the 
   DNN JavaScript correctly calculates the "Top/Right" coordinates 
   for the edit icons. */
.adqic-container {
    position: relative !important;
    min-height: 50px; /* Ensures enough space for the menu to appear */
}

/* 2. HIDE THE SYSTEM PANES
   Target both the wrapper class and the specific DNN IDs. We use 
   !important to override any inline styles DNN injects in Edit Mode. */
.dnn-hidden-panes, 
#HeaderPane, 
#FooterPane,
.dnn-hidden-panes *,
.adqic-container [id$="HeaderPane"],
.adqic-container [id$="FooterPane"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* 3. FIX ACTION MENU POSITIONING
   DNN 10.1 often injects an 'actionMenu' div. We ensure it floats 
   correctly at the top-right of your relative container. */
.actionMenu, 
.dnn_mact {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
}

/* 4. PREVENT EDIT MODE LAYOUT JUMPS
   If DNN injects a 'dnnDragHint' (the drag handle), this keeps it 
   from pushing down your custom title. */
.dnnDragHint {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

/* 5. CUSTOM CONTENT SPACING
   Ensures your content fills the container now that system 
   headers are removed. */
.custom-header, .custom-footer {
    width: 100%;
    box-sizing: border-box;
}