﻿/* SuperLinks Default writes this list in both the visitor and editor views. */
.fansa-home .fc-footer .fc-footer-useful .default-link > li > a[href] {
  color: #ffffffc2 !important;
  font-size: 13px !important;
}
.fansa-home .fc-footer .fc-footer-useful .default-link > li > a[href]:is(:hover, :focus-visible) {
  color: #ffc40c !important;
}

/* The four columns keep their labels and tick animation from the festival template. */
@media (max-width: 640px) {
  .fansa-home .fansa-festival-event .r4-clock .r4-time-part strong {
    font-size: clamp(1.7rem, 7.4vw, 2.15rem);
  }
}

@media (min-width: 1101px) {
  .fansa-home .fc-nav .fc-menu-list .fc-submenu {
    /* The reference uses 10px vertical padding plus a 27px Persian text line. */
    --fr-menu-row-height: 47px;
    grid-template-rows: repeat(var(--fr-rows, 1), minmax(var(--fr-menu-row-height), 1fr));
  }
  .fansa-home .fc-nav .fc-submenu > .fc-node {
    min-height: var(--fr-menu-row-height);
    padding-block: 0;
    align-items: stretch;
  }
  .fansa-home .fc-nav .fc-submenu .fc-node > .fc-link,
  .fansa-home .fc-nav .fc-submenu .fc-node > .fc-arrow {
    display: flex;
    align-items: center;
    align-self: stretch;
    box-sizing: border-box;
    min-width: 0;
    margin-block: 0;
    padding-block: 0;
  }
  .fansa-home .fc-nav .fc-submenu .fc-node > .fc-link {
    justify-content: space-between;
    font-size: .9rem;
    line-height: 1.55;
  }
  .fansa-home .fc-nav .fc-submenu .fc-node > .fc-arrow {
    justify-content: center;
  }
  .fansa-home .fc-nav .fc-submenu .fc-nav-caption {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .fansa-home .fc-nav .fc-submenu .fc-toggle::after {
    flex: none;
  }
  .fansa-home .fc-nav .fc-submenu .fc-node > .fc-submenu {
    /* Match first row to first row, accounting for the gold rule on the child panel. */
    top: -2px;
    right: calc(100% + 4px);
    left: auto;
  }
}

/* A populated DNN header pane needs room for its edit handle as well as the icons. */
.fansa-home:not(.fansa-control-view) .fc-header .fc-social-native:is(.dnnModuleManager,.dnnSortable):has(.DnnModule) {
  min-height: 44px !important;
  align-content: center;
}
.fansa-home:not(.fansa-control-view) .fc-header .fc-social-native .DnnModule:not(.forDrag,.floating,.ui-sortable-helper) {
  position: relative;
}
.fansa-home:not(.fansa-control-view) .fc-header .fc-social-native :is(.dnnModuleManager,.dnnSortable):not(.DNNEmptyPane):has(.DnnModule,.DNNModuleContent) {
  min-height: 0 !important;
}
.fansa-home:not(.fansa-control-view) .fc-header .fc-social-native .DnnModule:not(.forDrag,.floating,.ui-sortable-helper) > a[name]:not([href]):empty {
  position: absolute;
  width: 0;
  height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
}
.fansa-home:not(.fansa-control-view) .fc-header .fc-social-native .DnnModule:not(.forDrag,.floating,.ui-sortable-helper) > .dnnDragHint {
  position: absolute;
  inset-inline: 0;
  bottom: 100%;
  top: auto;
  z-index: 1;
}
.fansa-home:not(.fansa-control-view) .fc-header.fc-scrolled .fc-social-native .DnnModule:not(.forDrag,.floating,.ui-sortable-helper) > .dnnDragHint {
  bottom: auto;
  top: 100%;
}
.fansa-home:not(.fansa-control-view) .fc-header .fc-social-native .dnnActionMenu {
  z-index: 2;
}
/* An author can still edit the original heading in the DNN HTML editor. */
.fansa-home .fc-footer [data-fr-repeated-heading]:not([contenteditable]:not([contenteditable="false"]), [contenteditable]:not([contenteditable="false"]) *) {
  display: none !important;
}

/* A normal header item leaves a genuine space on the left of the RTL layout. */
.fansa-home .fc-bar > .fr-admin-tools-slot {
  display: flex;
  direction: ltr;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-start;
}
.fansa-home .fc-bar > .fr-admin-tools-slot[hidden] { display: none !important; }
.fansa-home .fr-admin-tools-toggle {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #ff8e97;
  border-radius: 50%;
  color: #fff;
  background: #ad1d31;
  cursor: pointer;
}
.fansa-home .fr-admin-tools-toggle:is(:hover, :focus-visible) { background: #8e1526; }
.fansa-home .fr-admin-tools-toggle[aria-pressed="true"] { background: #771321; box-shadow: inset 0 0 0 2px #fff; }
.fansa-home .fr-admin-tools-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.fansa-home .fr-admin-tools-toggle svg { display: block; width: 22px; height: 22px; }
@media (max-width: 1100px) {
  .fansa-home.is-home .fc-bar:has(> [data-fr-admin-slot]:not([hidden])) { flex-wrap: wrap !important; }
  .fansa-home .fc-bar > .fr-admin-tools-slot { flex: 0 0 100%; }
}
@media print {
  .fansa-home .fr-admin-tools-slot { display: none !important; }
}

/* DNN owns the frames and their state. The presentation override lasts one page view. */
body.fr-admin-panels-hidden :is(.personaBarContainer, .personalBarContainer, #personaBar-iframe,
    .personabar-placeholder, .editBarFrameContainer, #editBar-iframe) {
  display: none !important;
}
body.fr-admin-panels-hidden.personabar-visible,
body.fr-admin-panels-hidden:has(.personaBarContainer, .personalBarContainer, #personaBar-iframe) {
  margin-right: 0 !important;
}
body.fr-admin-panels-hidden:has(.editBarFrameContainer, #editBar-iframe) { margin-bottom: 0 !important; }
