/* TODO: Remove duplicate styles from styles.css */

input,
button {
    /* Some browsers (*cough* Safari *cough*) add a margin around buttons. Don't */
    margin: 0;
}

input[type="button"],
input[type="submit"],
button {
    /* Stop iOS Safari from trying to add a custom style to buttons */
    -webkit-appearance: none;
}

/*
 * Disable the default browser focus highlighting for anything that's not focus-visible so the focus ring is only
 * present when required. The focus-visible polyfill adds the focus-visible class to the element via JS as well as
 * js-focus-visible to the top-level html element to fallback to default highlighting behaviour if JS is disabled.
 * While a polyfill is required for not, this is an active area of development. See:
 *   - https://github.com/WICG/focus-visible/blob/master/explainer.md
 *   - https://web.dev/style-focus/#use-:focus-visible-to-selectively-show-a-focus-indicator
*/
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
}

::-ms-reveal {
    display: none;
}

form {
    margin: 0;
    padding: 0; /* IE default form padding is 10px, FF is 0px. This makes them look the same. */
}

.spacer {
    border-top: 1px solid #eee;
    margin: 8px 0;
}

/* Help link */

.help-link img {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    opacity: 0.9; /* 'same' value as optionMenu.css */
    transition: opacity 0.1s ease-in;
}

.help-link img:hover,
.help-link img:active {
    opacity: 1;
}

/* Annotations */

sup.anno {
    cursor: help;
}
table.crossTabTable .anno,
.sw2-contentHeaderContainer .anno {
    color: #5cb3ff;
    font-size: 11px;
}

.cell-anno-text-start {
    padding-left: 6px;
}

.cell-anno-text-end {
    padding-right: 8px;
}

.inline-anno {
    color: #5cb3ff;
    font-size: 11px;
    font-weight: normal;
}
#catalogueItemPageHeadings .inline-anno {
    vertical-align: middle;
}

.inline-anno-more {
    cursor: help;
}

.dijitTextBoxDisabled input {
    color: black !important;
}

input::-moz-focus-inner {
    /*http://davidwalsh.name/firefox-buttons*/
    border: 0;
    padding: 0;
}

/* Annotations Panel */
.foldPanelContent a {
    color: black;
    font-weight: bold;
    text-decoration: none;
}

/* Tab page Styles */

/* General Styles */
a img {
    border: 0 !important;
}
.activeLink {
    color: #333 !important;
    cursor: pointer !important;
    text-decoration: none;
}
.activeLink:hover {
    color: #000;
    text-decoration: underline !important;
}
.inactiveLink {
    color: #aaaaaa !important;
    cursor: default !important;
    text-decoration: none !important;
}

img.glyphicons-sw2-medium {
    width: 14px;
}

.display-none {
    display: none;
}

.hidden {
    visibility: hidden;
}
.visible {
    visibility: visible;
}
.clearfix {
    clear: both;
}
/* Inputs */

.activeTextField,
.inactiveTextField,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"] {
    font-size: 11px;
    line-height: 115%;
    background: #fff;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 2px;
    box-sizing: border-box;
}

select {
    padding: 3px 0;
}

.inactiveTextField,
.inactiveTextField:disabled,
.activeTextField:disabled,
select:disabled,
textarea:disabled,
input[type="text"]:disabled,
input[type="password"]:disabled {
    background: #fbfbfb;
    border: solid 1px #ddd;
}

/* Buttons  */

.activeButton,
.inactiveButton {
    font-family: inherit;
    font-size: 11px;
    line-height: 12px;
    text-decoration: none;

    display: inline-block;
    box-sizing: border-box;
    border: 1px solid #386197;
    padding: 4px 7px;
    border-radius: 3px;
}

.activeButton {
    /* change .dijitButtonNode in mapView.css too */
    color: #fff;
    background: #4275b7;
    cursor: pointer;
}

.activeButton:hover,
.activeButton:focus {
    text-decoration: none;
}

.activeButton:active {
    background: #386197;
    border-color: #233d5f;
}

.inactiveButton,
.inactiveButton:active,
button#downloadChart-btn:disabled {
    color: #666;
    background: #eee;
    border: 1px solid #ddd;
    cursor: default;
}

.buttonWithDropdown {
    z-index: 1;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.dropdownButton {
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    margin-left: -1px;
    padding-left: 3px;
    padding-right: 3px;
}

.dropdownButton:active {
    z-index: 1;
}

.floatButtonGroup {
    white-space: nowrap;
}

.floatButtonGroup > * {
    display: inline-block;
}

.floatButtonGroup .groupSaveControls-buttons {
    float: right;
}

.floatButtonGroup .groupSaveControls-buttons input {
    margin-left: 4px;
}

.forceHide {
    display: none !important;
}

/* Side Bar */
.contentPageLeftFunctionBar {
    border-right: 1px solid #cdcdcd;
    background: #f7f7f7;
    color: #111;
}
.customiseGraphPanel {
    /* because its position absolute */
    padding: 10px; /*Need to be the same as contentPageLeftFunctionBar*/
}
#map
    .dijitContentPane.dijitBorderContainer-child.dijitBorderContainer-dijitContentPane.dijitBorderContainerPane.dijitAlignLeft {
    /* Same as: contentPageLeftFunctionBar*/
    border-right: 1px solid #cdcdcd !important;
    background: #f7f7f7;
    color: #111;
}
#map
    .dijitContentPane.dijitBorderContainer-child.dijitBorderContainer-dijitContentPane.dijitBorderContainerPane.dijitAlignLeft
    > div,
#map #str_map_ui_LeftPanel_0 {
    padding: 10px;
}

.minimisedMenu {
    position: relative;
    width: 28px;
    background: #f7f7f7; /* Same as contentPageLeftFunctionBar */
    border-right: 1px solid #cdcdcd;
    display: none;
    text-align: center;
}

.minimisedMenu_img {
    width: 7px;
    margin-top: 20px;
}

.showHidePanelImg {
    display: inline-block;
    cursor: pointer;
}

.minimisedMenu.showPanel {
    display: block;
    cursor: pointer;
    z-index: 1;
}

.headerContent {
    white-space: nowrap;
}

.headerContent > * {
    margin: 0 0 0 4px;
}

.fileUploadHidden {
    margin-left: -9999px;
    height: 0;
}

.fileUploadFacadeButton {
    position: relative;
    top: -1.5px;
    width: 85px;
}

.fileUploadFacadeText {
    margin-left: 5px;
    margin-right: 5px;
    padding: 0 2px;
    height: 16px;
}

.fileUploadConfirmButton {
    position: relative;
    top: -1.5px;
}

/* Message (Info default) */
.message,
.messagePanel,
.errorPanel,
.info-message,
.baseErrorPanel,
.errorMsg, /* customData */
.fatalMsg, /* customData */
.warnMsg, /* customData */
.infoMsg, /* customData */
.errorContainer /* chartView */ {
    background: white;
    font-size: 11px;
    font-weight: bold;
    padding: 5px 10px;
    border-left: 3px solid #378eb9;
    color: #378eb9;
    display: block;
    margin-bottom: 10px;
}

/* Error, Fatal */
.validationError,
.messagePanel.error-message,
.errorMsg,
.fatalMsg {
    color: #d50000;
    font-weight: bold;
    line-height: 16px;
}

.messagePanel.error-message,
.errorMsg,
.fatalMsg {
    border-color: #d50000;
}

.validationError ol,
.validationError ul {
    list-style: initial;
    padding-left: 20px;
}

.validationError ol {
    list-style: decimal;
}

.rf-msg.validationError > * {
    padding: 0;
    background: none;
    color: inherit;
}

.validationError .rf-msg-det {
    display: block;
}

.termsContainer iframe {
    width: 100%; /* fl-fill should have been enough but IE also requires this. */
    border: 1px #ccc solid;
}

#termsForm {
    margin-top: 0.9rem;
}

.allErrorMs,
.allErrorMsg *,
.rf-msg-err,
.rf-msgs-err {
    background-image: none;
}

/* Warn */
.messagePanel.warning-message,
.customDataError,
.warnMsg {
    border-color: #d3ac45;
    color: #d3ac45;
    background-image: none;
}

/* Success, Ok */
.messagePanel.success-message {
    border-color: #378eb9;
    color: #378eb9;
}

.messagePanel.info-message a,
.customDataError .infoMsg a {
    color: #378eb9;
    text-decoration: none;
}
.messagePanel.info-message a:hover,
.customDataError .infoMsg a:hover {
    text-decoration: underline;
}

.messagePanelWithMargin {
    margin-left: 10px;
}
.messagePanelWithMargin ul,
.messagePanelWithMargin dl {
    margin-bottom: -10px;
}
.messagePanelWithMargin li:first-child,
.messagePanelWithMargin dt:first-child {
    margin-top: 10px;
}

#infoMessage {
    color: green;
}

/* Guest User Guide Page Styles */
.warningPanel {
    width: 30rem;
    font-size: 1.2rem;
    padding: 2rem;
    border: 1px solid #bbb;
    border-radius: 0.4rem;
    box-shadow: 0 0.1rem 0.3rem #ccc;
    position: relative;
}
.warningPanel .warningPanelIcon {
    position: absolute;
    top: calc(-2rem + 7px); /* Used px for the positioning part relative to the fixed resolution image. */
    background: #fff;
}
.warningPanel .warningPanelIcon img {
    opacity: 0.5;
}
.warningPanel a {
    font-weight: bold;
}

.progressCancelDiv {
    text-align: center;
    text-align: -webkit-center;
    padding: 10px 0 0 0;
}

/* Loading Spinner*/
.spinner {
    zoom: 1;
    cursor: wait;
    background: rgba(0, 0, 0, 0.25);
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
}
.outerLoad {
    top: 40%;
    position: relative;
    text-align: center;
}
.innerLoad {
    border-radius: 4px;
    background-color: white;
    height: 60px;
    margin: 0 auto;
    font-size: 0;
    top: 40%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    display: inline-block;
    padding: 0 8px;
}
.loadGif {
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
}
.loadTextDiv {
    display: inline-block;
    margin: 0 15px;
    vertical-align: middle;
    font-size: 13px;
}
.loadingText1 {
    font-weight: bold;
    display: block;
}
.loadingText2 {
    margin-top: 4px;
    display: block;
}

/* Bootstrap's DropDown */
.dropdown {
    position: relative;
}
.dropdown-menu {
    position: absolute;
    z-index: 1000;
    display: none;
    text-align: left;
    list-style: none;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
}
.dropdown-menu.ie-forceDisplay {
    display: block !important;
    opacity: 0;
    filter: alpha(opacity=0);
}
.dropdown-menu .divider {
    height: 1px;
    margin: 9px 0;
    overflow: hidden;
    padding: 0 !important;
    background-color: #e5e5e5;
}
.dropdown-menu > li > a {
    display: block;
    clear: both;
    white-space: nowrap;
}

.dropdown.show > .dropdown-menu,
.dropdown-visible {
    display: block !important;
}

.dropdown-menu-right {
    left: auto;
}
.dropdown-menu-left {
    right: auto;
}
.dropdown-hdr {
    display: block;
    white-space: nowrap;
}
.dropdown-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 990;
}

.dropdown-submenu {
    position: relative;
}
.dropdown-submenu > .dropdown-menu {
    top: 0;
    margin-top: -3px;
}
.dropdown-menu-right .dropdown-submenu > .dropdown-menu {
    right: 100%;
}
.dropdown-menu-left .dropdown-submenu > .dropdown-menu {
    left: 100%;
}
.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu:focus > .dropdown-menu {
    display: block;
}

.dropdown-submenu .dropdown-menu.forceshow {
    display: block;
}

.dropdown-submenu.pull-left {
    float: none;
}

.toggleLink.selected,
.hiddenCheckboxContainer.selected label,
.hiddenCheckboxContainer input[type="radio"][checked] + label,
.hiddenCheckboxContainer input[type="radio"]:checked + label {
    background: url(images/material/ic_check_black.svg) 2px center no-repeat;
    background-size: 16px;
    cursor: default;
}
.hiddenCheckboxContainer input[type="radio"]:checked + label {
    cursor: default;
}

/* Pagination controls */

.activeArrowButton:hover {
    color: #000 !important;
}

.activeArrowButton,
.inactiveArrowButton {
    font-size: 14px;
    text-decoration: none;
    padding: 0 4px;
    border: 0;
    background: none;
}

.activeArrowButton {
    color: #666 !important; /* Important required because of RecordVIEWS standard.css */
    cursor: pointer;
}

.inactiveArrowButton {
    color: #ccc !important; /* Important required because of RecordVIEWS standard.css */
}

/* Tree in modalSaveDialog and shareGroup */

#saveTableForm a,
#saveRecodeForm a {
    text-decoration: none;
    color: #666;
}
#saveTableForm a.node-selected,
#saveRecodeForm a.node-selected {
    font-style: italic;
    color: black !important;
    text-decoration: none;
    font-weight: bold;
}

.vAlignSpacer {
    height: 100%;
    width: 0;
    display: inline-block;
    vertical-align: middle;
}

.treeContainer {
    overflow: auto;
    background: white;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 2px;
    padding: 2px 0;
}

.rf-tab-cnt,
.rf-tab-hdr-tabline-vis.rf-tab-hdr-tabline-top,
.rf-tab-hdr-act.rf-tab-hdr-top,
.rf-tab-hdr-inact.rf-tab-hdr-top {
    background: none;
    border: 0;
    height: auto;
}

.rf-tab-hdr-tabline-vis.rf-tab-hdr-tabline-top {
    padding: 0 0 10px;
}

.rf-tab-hdr-brd {
    display: none;
}

.rf-tab-cnt,
.rf-tab-hdr-spcr {
    padding: 0 !important;
}

.rf-tab-hdr-act.rf-tab-hdr-top {
    border: 1px solid #ddd;
    border-bottom: 1px solid transparent;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

.rf-tab-hdr-spcr,
.rf-tab-hdr-inact.rf-tab-hdr-top {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid transparent;
    border-bottom: 1px solid #ddd;
}

.rf-tab-hdr-act.rf-tab-hdr-top,
.rf-tab-hdr-inact.rf-tab-hdr-top {
    font-weight: bold;
}

.rf-tab-hdr-act.rf-tab-hdr-top {
    padding: 3px 7px 5px;
}

.rf-tab-hdr-inact.rf-tab-hdr-top {
    padding: 3px 8px 5px;
    color: #666;
}

.rf-tab-lbl {
    line-height: 14px;
}

.rf-tab-lbl a {
    color: inherit;
    text-decoration: inherit;
}

/* ======== RichFaces generic styling ======== */

/* Tables */

.sw2Table.fullWidth {
    width: 100%;
}

.sw2Table {
    border-collapse: collapse;
    border-spacing: 0;
    border: 0;
    border-bottom: 1px solid #c4c0c9;
}

.sw2Table .rf-dt-hdr-c,
.sw2Table .rf-dt-shdr-c {
    border: 0;
    border-bottom: 1px solid #ddd;
    background: transparent;
    font-weight: bold;
    text-align: left;
    padding: 0 6px 3px 3px;
}

.sw2Table .rf-dt-c {
    border: 0;
    border-bottom: 1px solid #eee;
}

.sw2Table .rf-dt-r:hover {
    background: #fbfbfb;
}

.sw2Table .rf-dt-r a {
    text-decoration: none !important;
}

#downloadTableList.sw2Table .rf-dt-r a {
    text-decoration: underline !important;
}

.sw2Table .rf-dt-r > td > a,
.sw2Table .rf-dt-r > td > span,
.sw2Table .rf-dt-r > td > div > a {
    color: #111111 !important;
    display: inline-block;
}

.sw2Table .rf-dt-shdr-c > * {
    vertical-align: middle;
}

.sw2Table .rf-dt-c-srt,
.sw2Table .rf-dt-c-srt:hover {
    color: #000;
}

.sw2Table .rf-dt-srt-btn {
    width: 16px;
}

.rf-ulst-itm {
    padding: 1px 0;
}

.sw2TableList {
    border: 1px solid #ddd;
    border-radius: 2px;
    padding: 4px 6px;
    box-sizing: border-box;
    overflow: auto;
}

/* Table Pagination */

.sw2Pagination {
    box-sizing: border-box;
    margin-top: 0.4rem;
}

.sw2Pagination .rf-ds-nmb-btn,
.sw2Pagination .rf-ds-btn {
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #999;
    vertical-align: middle;
    white-space: nowrap;
}

.sw2Pagination .rf-ds-nmb-btn {
    width: 2em;
    padding: 2px 0 3px;
}

.sw2Pagination .rf-ds-btn {
    text-align: center;
    width: 2em;
    padding: 0 0 3px;
}

.sw2Pagination .rf-ds-act {
    border-bottom: 2px solid #7af;
    color: #000;
    font-weight: bold;
}

.sw2Pagination .rf-ds-btn-first,
.sw2Pagination .rf-ds-btn-prev,
.sw2Pagination .rf-ds-btn-next,
.sw2Pagination .rf-ds-btn-last {
    display: none;
}

.sw2Pagination .rf-ds-dis {
    visibility: hidden;
}

/* Trees */

.rf-trn {
    display: table;
    overflow: auto;
    padding: 0;
}
.rf-trn-hnd,
.rf-trn-cnt {
    display: table-cell;
    min-width: 16px;
    padding: 0;
}
.rf-trn-hnd-lf {
    pointer-events: none;
}
.rf-trn,
.rf-tr-nd {
    background: none;
}
.rf-trn-hnd-exp {
    background: url("images/Expanded.png") no-repeat center;
}
.rf-trn-hnd-colps {
    background: url("images/Collapsed.png") no-repeat center;
}

.rf-trn-ico {
    margin: 1px 2px;
}

.noIcon {
    display: none;
}

.rf-trn-cnt {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
}
.rf-trn-cnt:hover,
.noSelectTree .rf-trn-sel:hover {
    background: #f7f7f7;
}
.rf-trn-sel,
.rf-trn-sel:hover {
    background: #dde7f3;
}
.noSelectTree .rf-trn-sel,
.noHoverTree .rf-trn-cnt:hover,
.noHoverTree .rf-trn-sel:hover {
    background: none;
}
.rf-trn-lbl {
    height: 100%;
    padding: 0 2px 0 0;
    font-size: 0;
}
.rf-trn-lbl,
.rf-trn-cnt {
    cursor: pointer;
}
.noSelectTree .rf-trn-lbl,
.noSelectTree .rf-trn-cnt {
    cursor: default;
}

/* Table Filters */

.fieldName {
    white-space: pre;
    display: inline-block;
}

.tableFilters {
    margin-left: 10px;
}

.tableFieldTitle > * {
    vertical-align: middle;
}

#table-filters .fieldName,
#table-layers .fieldName {
    margin-top: 3px;
    margin-bottom: 3px;
}

#table-layers select {
    margin: 0 0 0 4px;
    max-width: 500px;
}

/* Metadata Info */

.metaInfoButton {
    margin-left: 4px;
}

.metaInfoButton,
.sortControl {
    display: inline-block;
    vertical-align: middle;
    font-size: 0;
}

.metaInfoButton,
.sortControl,
#tableViewPanel #table-layers li div a {
    text-decoration: none;
}

@media print {
    select {
        /*for firefox*/
        -moz-appearance: none;
        /*for chrome*/
        -webkit-appearance: none;
        appearance: none;
        border: none;
    }

    select::-ms-expand {
        display: none;
    }
}
