/*
 * SharedBase - global.css
 * Shared CSS overrides applied to ALL TrueStandings apps.
 * Contains only rules with no app-specific image references.
 * App-specific rules (login page, logo, folder icon) live in each app's plugin.
 *
 * Overrides: pageDesktop.css, mstrColorThemeRed.css, mstr.css (path/breadcrumb),
 *            fsm.css (Poppins font, buttons, toolbar, footer)
 */

/* ============================================================
   MSTR login form buttons — hide on all non-login pages.
   LoginTransform renders the full login form (including the
   Login and Cancel buttons) on every page; hide them everywhere
   except the actual login page.
   Selectors confirmed from MSTR 11.5 LoginTransform output.
   ============================================================ */

body:not(.mstr-page-login) .mstrLoginButtonBarLeft .mstrButton,
body:not(.mstr-page-login) .mstrLoginButtonBarRight .mstrButton {
    display: none !important;
}

/* ============================================================
   pageDesktop.css overrides
   ============================================================ */

.mstrFooterWrapper {
    display: none;
}

.mstr-dskt-lnk .mstr-dskt-dsc {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 80px;
    background-color: #f4f4f4;
    border-radius: 0 0 5px 5px;
    border-top: 2px solid transparent;
    overflow: hidden;
    -webkit-transition: all 100ms;
    -moz-transition: all 100ms;
    transition: all 100ms;
    z-index: 1;
    opacity: 0;
    filter: alpha(opacity=0);
}


/* ============================================================
   mstrColorThemeRed.css overrides
   ============================================================ */

/* Brand-color for base/non-hover states */
.mstrWeb.Red .mstrListBlockToolbarItem,
.Red .mi-dskt-logout:link,
.Red .mi-dskt-logout:visited {
    color: #004054;
}

/* White text on menu/toolbar hover and selected states (colored highlight backgrounds) */
.mstrWeb.Red .mstrFloatingMenuItem .hover,
.mstrWeb.Red .mstrFloatingMenuItem:hover,
.mstrWeb.Red .mstrListBlockToolbarItemSelected,
.mstrWeb.Red .mstrListBlockToolbarItemSelectedHover,
.mstrWeb.Red .mstrListBlockToolbarItemHover .mstrListBlockToolbarItemName,
.mstrWeb.Red .mstrmojo-TC-CXM .mstrmojo-ContextMenuItem:hover,
.mstrWeb.Red .mstrPicker span.mstrPickerItemHover,
.mstrWeb.Red .mstrSuggestPopupItem.selected span,
.mstrWeb.Red .menu-row-selected .menu-item,
.mstrWeb.Red .menu-row-selected .menu-item-with-separator {
    color: #fff !important;
}

.mstrWeb.Red #tree_ftb_FolderTreeView li:hover a,
.mstrWeb.Red .mstrMenuItem:hover a,
.mstrWeb.Red .mstrMenuItem:hover span,
.mstrWeb.Red .mstrPathTextCurrent:hover .mstrPathLast,
.mstrWeb.Red .mstrShortcutsListPopup .item.selected,
.mstrWeb.Red .mstrShortcutsListPopup .item:hover,
.mstrWeb.Red #mstrToolbarList.mstrShortcutsListPopup .item:hover {
    color: #004054;
}


/* ============================================================
   mstr.css overrides — path bar and breadcrumb colors only
   (logo and folder icon overrides are app-specific)
   ============================================================ */

.mstrPath SPAN,
.mstrPath SPAN A:link,
.mstrPath SPAN A:visited {
    color: rgb(255,255,255);
}

.mstrPathTextCurrent,
.mstrPathTextAncestors {
    font-size: 11px;
    font-weight: bold;
    float: left;
    height: 40px;
    max-width: 300px;
}

.mstrPath .mstrPathTextCurrent {
    cursor: pointer;
    padding-right: 23px;
    text-shadow: #FFF 1px 1px 1px;
}

/* pageDesktop.css sets .mstrPathLast { color:#656565 !important } — override with
   higher specificity to keep the current page title white on the dark path bar. */
.mstrPath .mstrPathLast {
    color: #ffffff !important;
}

.mstrWeb.mstr-page-about .mstrPath .mstrPathTextCurrent:hover .mstrPathLast {
    color: #ffffff !important;
}

.mstrPath .mstrPicker,
.mstrPath .mstrPathBreadCrumbsAncestors {
    border: 1px solid #999;
    border-top: 0;
    margin-top: 82px;
    min-width: 100px;
    -webkit-border-radius: 0 0 3px 3px;
    border-radius: 0 0 3px 3px;
    background-color: rgb(31,50,62);
}
.mstrPath .mstrPicker {
    padding: 6px;
}
.mstrPath .mstrPathBreadCrumbsAncestors {
    padding: 1px;
}
.mstrPathBreadCrumbsAncestors span {
    background: #8f9da3;
}

.mstrStandardHighlighted {
    color: #c00 !important;
}


/* ============================================================
   fsm.css overrides — Poppins font, buttons, toolbar, footer
   ============================================================ */

.mstrWeb {
    color: rgb(31,50,62);
    background: #fff !important;
    font-family: Poppins !important;
    font-size: 8pt;
    margin: 0;
    padding: 0;
}

.mstrWeb INPUT,
.mstrWeb SELECT,
.mstrWeb TEXTAREA {
    font-family: Poppins !important;
    font-size: 8pt;
}

.mstrButton,
.mstrButton:hover.disabled,
.mstrButton[disabled]:hover {
    color: #656565;
    margin: 3px;
    padding: 3px 5px;
    background: #dedede;
    background: -webkit-linear-gradient(top, rgba(237,237,237,1) 1%, rgba(228,228,228,1) 100%);
    background: -moz-linear-gradient(top, rgba(237,237,237,1) 1%, rgba(228,228,228,1) 100%);
    background: linear-gradient(to bottom, rgba(237,237,237,1) 1%, rgba(228,228,228,1) 100%);
    height: auto;
    border: 1px solid #ccc;
    box-shadow: inset 0 0 6px 0 rgba(255,255,255,1);
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    outline: 0;
    text-align: center;
}

.mstrButton:hover {
    color: #4d4d4d;
    border-color: #aaa;
    background: -webkit-linear-gradient(bottom, rgba(228,228,228,1) 1%, rgba(220,220,220,1) 100%);
    background: -moz-linear-gradient(bottom, rgba(228,228,228,1) 1%, rgba(220,220,220,1) 100%);
    background: linear-gradient(to top, rgba(228,228,228,1) 1%, rgba(220,220,220,1) 100%);
}

.mstrToolbar,
.mstrToolbar2 {
    margin: 0;
    height: auto;
    z-index: 105;
    float: left;
    padding-left: 0;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Our global rule above adds float+margins that cause the dockTop toolbar
   buttons to overflow the container on the left only (height mismatch).
   Reset margins here — float:left is kept so buttons remain left-aligned. */
.mstrDockTop .mstrToolbar,
.mstrDockTop .mstrToolbar2 {
    margin-top: 0;
    margin-bottom: 0;
}

/* Send Now: "Delivery Format:" label + [HTML▼] select wrap vertically with
   Poppins because the replaced-element select can't fit next to the label
   float inside the auto-width td. Switch label to inline-block and add
   white-space:nowrap on the td so they are forced onto the same line. */
#DIV_deliveryFormats td:first-child {
    white-space: nowrap;
}
#DIV_deliveryFormats td:first-child > label {
    float: none !important;
    display: inline-block !important;
    width: 11em;
    white-space: normal;
    vertical-align: top;
    padding-top: 0.3em;
    overflow: visible;
}

/* pathBarIcons.png sprite positions differ enough that the enabled back arrow
   appears lighter than the disabled forward arrow on our dark path bar.
   Apply brightness(0) invert(1) to normalise both to white, then control
   visibility with opacity — same approach used for #tbHome in app CSS. */
.mstrPathIcons #tbBack0,
.mstrPathIcons #tbForward0 {
    filter: brightness(0) invert(1) !important;
    opacity: 1;
    transition: opacity 0.12s;
}
.mstrPathIcons #tbBack0.disabled,
.mstrPathIcons #tbForward0.disabled {
    opacity: 0.4;
}
.mstrPathIcons a:hover #tbBack0:not(.disabled),
.mstrPathIcons a:hover #tbForward0:not(.disabled) {
    opacity: 1 !important;
}

/* mstr.css upgraded "arial" in this rule; restore Poppins to match OnPrem */
#leftToolbar .mstrMenuItemcreate span {
    font-family: Poppins !important;
}

/* Search (magnifying glass) icon on dark path bar — invert to white */
#mstrSearchSuggest {
    filter: brightness(0) invert(1) !important;
    opacity: 0.85;
    transition: opacity 0.12s;
}
#mstrSearchSuggest:hover {
    opacity: 1 !important;
}

/* "My Subscriptions" cannot be removed via pageConfig toolbar shortcut-list (null-key crash);
   hide via CSS. The <a> has class="mstrLink" (not "subscriptions"), so target by title.
   :has() hides the parent <li> to avoid an empty row. */
a[title="My Subscriptions"],
li:has(> a[title="My Subscriptions"]),
.item:has(> a[title="My Subscriptions"]) {
    display: none !important;
}

.mstrFooterWrapper {
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 3;
    background: #edecec;
    background: -webkit-linear-gradient(#f0f0f0, #cdcdcd);
    background: -moz-linear-gradient(#f0f0f0, #cdcdcd);
    background: linear-gradient(#f0f0f0, #cdcdcd);
    font-size: 1.1em;
    -webkit-transition: bottom 500ms;
    -moz-transition: bottom 500ms;
    transition: bottom 500ms;
}

/* Workaround ncSubsChnagesPage.css was not loaded by the designated plugin */
#DIV_fileName #fileName {
    width: 185px !important;
}
