body {
    /*Set position to relative so positioning of absolute divs is calculated from page size, not browser window size*/
    position: relative;
}

/***************************
	FIXED-WIDTH PAGE LAYOUT
*****************************/
body {
    /*fixing a single minimum width of the page until responsive menu/tables developed*/
    min-width: 90em;
}

div.headerAndTitleGroup, div.menuAndContentGroup {
    /*fixing a single max width of the page content until responsive menu/tables developed*/
    max-width: 115em;
}

/*************************
	PAGE LAYOUT
***************************/
body {
	diaply: table;
	width: 100%;
}

div.headerAndTitleGroup, div.menuAndContentGroup, footer {
    display: table-row;
}

header, section.pageTitle, nav, div.contentAndSelectionGroup, div.footerIcon,
    div.footerPanel {
    display: table-cell;
}

header, nav, div.contentAndSelectionGroup, div.footerIcon, div.footerPanel
    {
    vertical-align: top;
}

header, nav, div.footerIcon {
    width: 18.75em;
}

section.pageTitle {
    vertical-align: bottom;
}

header, section.pageTitle, section.breadcrumb, section.mainContent, div.footerIcon
    {
    box-sizing: border-box;
    padding: 2em;
}

header {
    padding-top: 2.25em;
    padding-bottom: 2.35em;
}

section.pageTitle, section.breadcrumb, section.mainContent, section.contentSelector
    {
    padding-left: 2.5em;
}

section.contentSelector {
    padding-right: 2em;
}

section.pageTitle {
    padding-bottom: 0.5em;
}

section.loginInfo, section.logoutButton {
    display: inline-block;
    padding: 1em;
    vertical-align: middle;
}

div.loginInfoAndLogoutButtonGroup {
    position: fixed;
    top: 0;
    right: 0;
    vertical-align: top;
}

section.breadcrumb {
    padding-bottom: 1em;
    padding-top: 2em;
}

section.mainContent {
    padding-top: 0;
}

/*************************
	SECTION DIVS
***************************/
header #headerPanel {
    width: 100%;
}

header #headerPanel, footer div.footerIcon {
    text-align: center;
}

/*Can't use first-child as there may be empty wicket containers before it*/
section.loginInfo>div.userDetailsPanel {
    display: inline-block;
    margin-left: 2em;
}

section.loginInfo>div.userDetailsPanel+div.userDetailsPanel {
    margin-left: 1em;
}

section.logoutButton>div {
    margin-right: 1em;
    float: right;
}

footer>div>div {
    display: inline-block;
}

div.footerPanel {
    box-sizing: border-box;
    padding: 1.5em 1em;
}

nav li a {
    display: block;
    padding-bottom: 2em;
    padding-top: 2em;
    width: 100%;
}

nav li ul a.menuLink {
    padding-bottom: 1.35em;
    padding-top: 1.35em;
    font-size: 100%;
}

li.unselected ul {
    display: none;
}

div.secondaryNavigation div {
    margin-right: 0.5em;
    padding-right: 0.5em;
}

.wicket-ajax-indicator {
    position: absolute;
}

/*************************
	MODAL WINDOWS
***************************/
body.modal-window-body div.headerAndTitleGroup {
    display: none;
}

body.modal-window-body div.menuAndContentGroup, body.modal-window-body .contentAndSelectionGroup
    {
    display: block;
}

body.logged-in.modal-window-body section.mainContent {
    max-width: 100%;
    min-width: 100%;
    width: 100%;
}

body.logged-in.modal-window-body section.mainContent, body.not-logged-in.modal-window-body section.mainContent
    {
    margin: 0;
    min-height: auto;
    padding: 1em;
}

/*************************
	PAGE-SPECIFIC
***************************/
.login section.breadcrumb {
    display: none;
}

.login .mainContent {
    padding: 3.5em 3.5em 7em 2.75em;
}

div.loginTopMessage:not (:empty ) {
    width: 98%; /* IE8-specific fix - remove when IE8 no longer supported */
    width: calc(100% - 21em);
}

.cookiesError:not (:empty ) {
    width: 98%; /* IE8-specific fix - remove when IE8 no longer supported */
 	width: calc(100% - 23em);
 }
 
 
.portfolio .accountSelectorPanel,
.asset-allocation .accountSelectorPanel {
    float: left;
    width: auto;
    margin-right: 3em;
}

.portfolio #currencyProviderContainer,
.asset-allocation #currencyProviderContainer {
    width: auto;
    float: none;
}

.asset-allocation #currencyProviderContainer {
    vertical-align: top;
}

.statement .formInputAreaPanel .statementCurrency,
.statement .formInputAreaPanel .statementLedgers,
.statement .formInputAreaPanel .dateSelectorPanel,
.tx-history .formInputAreaPanel .formInputPanel, 
.tx-history .formInputAreaPanel .dateSelectorPanel,
.documents .formInputAreaPanel .docTypeDropDown,
.documents .formInputAreaPanel .dateSelectorPanel,
.account-summary .introductoryInformationPanel  {
    display: inline-block;
}

.statement .formInputAreaPanel .statementCurrency,
.statement .formInputAreaPanel .statementLedgers,
.tx-history .formInputAreaPanel .formInputPanel,
.asset-allocation #currencyProviderContainer,
.documents .formInputAreaPanel .docTypeDropDown {
   margin-right: 3em;
}

.documents .formInputAreaPanel {
    float: left;
}

.statement .formInputAreaPanel label,
.tx-history .formInputAreaPanel label,
.documents .formInputAreaPanel label {
    min-width: 6em;
}

.portfolio .portfolioSelectorPanel,
.asset-allocation .portfolioSelectorPanel,
.documents .formButtonPanel {
    clear: right;
    margin-top: -0.25em;
    width: auto;
}

.portfolio .portfolioSelectorPanel {
    float: right;
    margin-right: -1em;
}

.accountAndPortfolioTable td, 
.accountAndPortfolioTable tr.portfolioSummaryLine td {
    padding-top: 0.3em;
    padding-bottom: 0.3em;
}

.accountAndPortfolioTable tr.portfolioSummaryLine td {
    padding-bottom: 0.3em;
}

.portfolioValuationTable.containsGroupedRows tr td,
.portfolioValuationTable.containsGroupedRows tr.subtotal td,
.portfolioValuationTable.containsGroupedRows tr.groupByRow td  {
    padding-top: 0.3em;
    padding-bottom: 0.3em;
}

.portfolioValuationTable.containsGroupedRows tr.groupByRow + tr td {
    padding-top: 0.3em;
}

.account-summary .introductoryInformationPanel p {
    margin-top: 0;
}

.account-summary .grandTotalPanel {
    float: right;
    width: auto;
    margin-right: 1em;
}

.grandTotalPanel .space,
.grandTotalPanel .sectionSubHeading {
    display: none;
}

.downloadTypeSelecterTable td, .downloadTypeSelecterTable .dashboard {
    padding: 0 1.5em 0 0;
}

.downloadTypeSelecterTable {
    width: auto;
    float: left
}

.downloadTypeSelecterTable td {
    vertical-align: top;
}

.selecterCol div {
    padding-top: 1.5em;
}

.downloadTypeSelecterTable form {
    margin: 0;
    padding: 0;
}

.review-downloads .downloadTypeSelector {
    padding-top: 1em;
}

.downloadDateSelectors {
    float: left;
    padding-right: 1.5em;
}

.createDownloadButton {
    float: right;
}

.review-downloads .refreshDownloadForm {
    margin-top: 1em;
}