/**
 * Drupal 11 compatibility fixes
 * Gavias Batiz Mega Menu
 */

@media (min-width: 991px) {

  /* Restore nested submenu animation */
  .menu-hover .navigation .gva_menu .sub-menu > li > ul {
    visibility: visible;
    opacity: 1;
    display: block;
    left: auto; /* Replaced 100% value due to misplacement of submenus within megamenu*/
    box-shadow: none; /* Removed box shadow from the first ul under any sub-menu - doesn't seem to break anything else but if it does, make it specific to the 3rd nesting since that is what inspired this fix */

    -webkit-transform: rotateX(0);
    -moz-transform: rotateX(0);
    -ms-transform: rotateX(0);
    -o-transform: rotateX(0);
    transform: rotateX(0);
  }

  /* Restore nested submenu items */
  .menu-hover .navigation .gva_menu .sub-menu > li > ul > li,
  .menu-hover .navigation .gva_menu .sub-menu > li > ul > ul,
  .menu-hover .navigation .gva_menu .sub-menu > li > ul > div {
    visibility: visible;
    z-index: 11;
  }
  
}

/* ==========================================================
   Disclosure Documents Archive - Accordion
   ========================================================== */

/* Remove Bootstrap's default panel appearance. */
#disclosure-accordion .panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 4px;
    background: #fff;
}

/* Remove Bootstrap/Gavias padding from the heading itself. */
#disclosure-accordion .panel-heading {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

/* Remove heading margins. */
#disclosure-accordion .panel-heading .panel-title {
    margin: 0;
}

/* ==========================================================
   Accordion headings
   ========================================================== */

/* Expanded section. */
#disclosure-accordion .panel-heading .panel-title > a {
    position: relative;
    display: block;

    padding: 16px 50px 16px 18px;

    background: #9854B3;
    color: #fff;
    border: 1px solid #9854B3;

    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

/* Collapsed section. */
#disclosure-accordion .panel-heading .panel-title > a.collapsed {
    background: #fff;
    color: #333;
    border-color: #e8e8e8;
}

/* Hover/focus state for collapsed sections. */
#disclosure-accordion .panel-heading .panel-title > a.collapsed:hover,
#disclosure-accordion .panel-heading .panel-title > a.collapsed:focus {
    background: #f7f2f9;
    color: #9854B3;
    border-color: #9854B3;
    text-decoration: none;
}

/* Keep expanded section purple on hover/focus. */
#disclosure-accordion .panel-heading .panel-title > a:not(.collapsed):hover,
#disclosure-accordion .panel-heading .panel-title > a:not(.collapsed):focus {
    background: #9854B3;
    color: #fff;
    border-color: #9854B3;
    text-decoration: none;
}

/* ==========================================================
   Accordion icons
   Correct Gavias' reversed +/- states.
   ========================================================== */

/* Expanded = minus. */
#disclosure-accordion .panel-heading .panel-title > a::after {
    content: "\f068";
    font-family: "FontAwesome";

    position: absolute;
    top: 50%;
    right: 18px;

    transform: translateY(-50%);

    font-size: 14px;
    font-weight: 400;
    line-height: 1;

    color: #fff;
}

/* Collapsed = plus. */
#disclosure-accordion .panel-heading .panel-title > a.collapsed::after {
    content: "\f067";
    color: #9854B3;
}

/* ==========================================================
   Expanded content
   ========================================================== */

/*
 * Remove the inner border around the document area.
 * The accordion heading already provides enough visual
 * separation between sections.
 */
#disclosure-accordion .panel-collapse {
    border: 0;
    background: #fff;
}

/*
 * Give the document area more breathing room so the list
 * does not sit directly against the edges of the accordion.
 */
#disclosure-accordion .panel-body {
    padding: 22px 28px 24px;
    border: 0 !important;
}

/* ==========================================================
   Document list
   ========================================================== */

/* Properly inset the bullets within the expanded section. */
#disclosure-accordion .panel-body ul {
    margin: 0;
    padding-left: 24px;
}

/* Improve spacing and readability between documents. */
#disclosure-accordion .panel-body li {
    padding-left: 4px;
    margin-bottom: 9px;
    line-height: 1.55;
}

/* Avoid unnecessary space beneath the final document. */
#disclosure-accordion .panel-body li:last-child {
    margin-bottom: 0;
}