/* Set a maximum width for the site */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px !important;
    }
}

/* Header */
@media (min-width: 430px) and (max-width: 767px) { /* stop logos stretching too tall */
    .rpw-logo {
        padding-bottom: 18% !important;
    }
}

/* set back to fixed size on MD+ devices */
@media (min-width: 768px) {
    .rpw-logo {
        flex: 1;
        padding-bottom: 0 !important;
        height: 98px;
    }

    .rpw-logo {
        max-width: 389px;
    }
}

#header {
    background-color: #83a81b;
}

.rpw-logo {
    padding-bottom: 22%;
    background: url(/static-resources/img/header-f54a83b8e99fa703187c75d9b9f7f01b.png) no-repeat #83a81b;
    background-size: contain;
}

/* Green colouration of the navigation bar */
[id="nav-agricultural:nav"], [id="nav-thirdparty:nav"] {
    background-color: #638014 !important;
}

/* Simple placeholder styling to create a blank area */
.placeholder {
    min-height: 200px;
    color: #757575;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Scroll wrapper for tables */
.table-wrapper {
    overflow-x: auto;
}

.table-wrapper table {
    overflow-x: auto;
    min-width: 900px;
}


.table-wrapper-soft {
    overflow-x: auto;
}

.table-wrapper-soft table {
    overflow-x: auto;
}

/* Soften DTs from bootstrap default */
dt {
    font-weight: 600 !important;
}

/* Card headers made from H tags need styles reset */
.card-header {
    font-size: 1rem !important;
    font-weight: normal !important;
    line-height: 1.5 !important;
}

/* It is preferred that the headers are slightly padded away from their content by default */
.h3, h3 {
    font-size: 1.75rem;
    margin-bottom: .75rem;
}

/* Small grants table with fixed left hand column */
.optionMatrix {
    overflow-x: scroll;
    margin-left: 240px;
    overflow-y: visible;
    margin-bottom: 30px;
}

.optionMatrix td, .optionMatrix th {
    margin: 0;
    min-width: 80px;
}

.optionMatrix .fieldIdCol {
    position: absolute;
    width: 240px;
    left: 0;
    top: auto;
}

.optionMatrix .fieldIdCol button {
    white-space: nowrap;
    text-overflow: ellipsis;
    width: 100%;
    overflow: hidden;
    text-align: left;
}

@media (min-width: 0px) and (max-width: 767px) {
    .optionMatrix { margin-left: 180px; }
    .optionMatrix .fieldIdCol { width: 180px; }
}

/* Full screen modal styles. Has been used to make a full screen map */
.modal.modal-full-screen .modal-dialog {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    max-width: 100vw;
    max-height: 100vh;
}

.modal-full-screen .modal-dialog .modal-content {
    height: 100vh;
}

.modal-full-screen .modal-dialog .modal-header {
    padding: 0 10px 3px 0;
}

.modal-full-screen .modal-dialog .modal-body {
    padding: 0;
}

/* Remove bottom margins from the last paragraphs in message boxes */
.alert p:last-child {
    margin-bottom: 0 !important;
}

.select-one-radio-styling > div {
    padding-top: 10px !important;
}

/* Document upload override styles */
[id="createMessageForm:files"] .name, [id="messageForm:files"]  .name, [id="uploadGlastirDocumentForm:files"]  .name{
    margin-bottom: 0;
}

[id="createMessageForm:files"] #fileupload-controls, [id="messageForm:files"] #fileupload-controls, [id="uploadGlastirDocumentForm:files"] #fileupload-controls {
    display: inline-block;
}

[id="createMessageForm:files"] #fileupload-progress, [id="messageForm:files"] #fileupload-progress, [id="uploadGlastirDocumentForm:files"] #fileupload-progress{
    display: inline-block;
    vertical-align: top;
    padding-top: 5px;
    padding-left: 12px;
    margin-bottom: 15px;
}

[id="createMessageForm:files"] .progress-extended, [id="messageForm:files"] .progress-extended, [id="uploadGlastirDocumentForm:files"] .progress-extended{
    font-size: 10px;
    margin-top: -15px;
}

[id="createMessageForm:files"] .template-download:before, [id="createMessageForm:files"] .template-download:after,[id="uploadGlastirDocumentForm:files"] .template-download:before, [id="uploadGlastirDocumentForm:files"] .template-download:after, #messageConversation .chatbox .compose-message:before, #messageConversation .chatbox .compose-message:after {
    display: table;
    content: "";
    clear: both;
}

[id="createMessageForm:files"] .template-download [class^='span'] , [id="createMessageForm:files"] .template-upload [class^='span'],
[id="messageForm:files"] .template-download [class^='span'] , [id="messageForm:files"] .template-upload [class^='span'],
[id="uploadGlastirDocumentForm:files"] .template-download [class^='span'] , [id="uploadGlastirDocumentForm:files"] .template-upload [class^='span']
{
    width: auto;
    float: none;
    margin-left: 0;
}

[id="createMessageForm:files"] .template-download, [id="createMessageForm:files"] .template-upload ,
[id="messageForm:files"] .template-download, [id="messageForm:files"] .template-upload,
[id="uploadGlastirDocumentForm:files"] .template-download, [id="uploadGlastirDocumentForm:files"] .template-upload
{
    padding: 10px;
    padding-right: 120px;
    position: relative;
    height: auto;
}

/* file name */
[id="createMessageForm:files"] .template-download div:first-child, [id="createMessageForm:files"] .template-upload div:first-child,
[id="messageForm:files"] .template-download div:first-child, [id="messageForm:files"] .template-upload div:first-child,
[id="uploadGlastirDocumentForm:files"] .template-download div:first-child, [id="uploadGlastirDocumentForm:files"] .template-upload div:first-child
{
    display: inline-block;
    vertical-align: baseline;
}

[id="createMessageForm:files"] .name, [id="messageForm:files"] .name, [id="uploadGlastirDocumentForm:files"] .name {
    margin-bottom: 0;
    max-width: 500px;
    text-overflow: ellipsis;
    overflow: hidden;
    vertical-align: bottom;
}

/* buttons */
[id="createMessageForm:files"] .template-download div:first-child + div, [id="createMessageForm:files"] .template-upload div:first-child + div,
[id="messageForm:files"] .template-download div:first-child + div, [id="messageForm:files"] .template-upload div:first-child + div ,
[id="uploadGlastirDocumentForm:files"] .template-download div:first-child + div, [id="uploadGlastirDocumentForm:files"] .template-upload div:first-child + div
{
    display: block;
    float: right !important;
    position: absolute;
    right: 0;
    top: 5px;
}

/* size */
[id="createMessageForm:files"] .template-download div:first-child + div + div, [id="createMessageForm:files"] .template-upload div:first-child + div + div ,
[id="messageForm:files"] .template-download div:first-child + div + div, [id="messageForm:files"] .template-upload div:first-child + div + div ,
[id="uploadGlastirDocumentForm:files"] .template-download div:first-child + div + div, [id="uploadGlastirDocumentForm:files"] .template-upload div:first-child + div + div
{
    display: inline-block;
    padding-left: 25px;
    width: 100px;
    vertical-align: top;
}

[id="createMessageForm:files"] .template-upload div:first-child + div + div .size, [id="messageForm:files"] .template-upload div:first-child + div + div .size, [id="uploadGlastirDocumentForm:files"] .template-upload div:first-child + div + div .size {
    display: none;
}

[id="createMessageForm:files"] .template-upload div:first-child + div + div .progress, [id="messageForm:files"] .template-upload div:first-child + div + div .progress, [id="uploadGlastirDocumentForm:files"] .template-upload div:first-child + div + div .progress {
    margin-bottom: 5px;
}

[id="createMessageForm:files"] .template-download div:first-child + div + div + div, [id="createMessageForm:files"] .template-upload div:first-child + div + div  + div,
[id="messageForm:files"] .template-download div:first-child + div + div + div, [id="messageForm:files"] .template-upload div:first-child + div + div  + div ,
[id="uploadGlastirDocumentForm:files"] .template-download div:first-child + div + div + div, [id="uploadGlastirDocumentForm:files"] .template-upload div:first-child + div + div  + div
{
    display: none;
}

.template-download.template-download-complete .name:before {
    display: inline-block;
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    color: #578a14;
    margin-right: 5px;
    background-color: #cbff65;
    border: 1px solid #98c76c;
    width: 22px;
    height: 22px;
    text-align: center;
    border-radius: 9px;
    font-weight: 900
}

.template-upload .name:before, .template-download .name:before  {
    display: inline-block;
    content: "\f00d";
    font-family: "Font Awesome 5 Free";
    color: #ff3e3e;
    margin-right: 5px;
    background-color: #ff9b9b;
    border: 1px solid #ff0000;
    width: 22px;
    height: 22px;
    text-align: center;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 900
}

.progress {
    margin-top: 5px;
}

.progress .bar {
    background-color: #5577DD;
}

/* Ensure the remove document button doesn't disappear on mobile */
button.btn.btn-danger.delete span {
    display: block;
}

/* Document list */
ul.file-list {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

ul.file-list > li {
    height: auto;
    min-height: 48px;
    margin-bottom: 10px;
}

ul.file-list > li > a {
    display: block;
    padding: 8px 0 0 58px;
    height: auto;
    min-height: 41px;
}

ul.file-list > li .ghost-document {
    display: block;
    padding: 0 0 0 58px;
}


ul.file-list span {
    color: #757575;
    display: block;
    word-wrap: break-word;
}

ul.file-list span:hover {
    cursor: pointer;
}

ul.file-list > li /* General file */ , ul.file-list > li.textplain /* TXT file */ {
    background-image: url(/static-resources/img/ftypes/file-f7de4076e9bca23e363ef487b4b0d8e4.png);
    background-repeat: no-repeat;
}

ul.file-list > li.pdf /* PDF */ {
    background-image: url(/static-resources/img/ftypes/pdf-c901e34bc0b0f0515e301b75e39fb995.png);
    background-repeat: no-repeat;
}

ul.file-list > li.doc /* DOC */ {
    background-image: url(/static-resources/img/ftypes/doc-b0dca9cd05e14c0b5c0c2de027a09e2a.png);
    background-repeat: no-repeat;
}

ul.file-list > li.excel /* Excel file */ {
    background-image: url(/static-resources/img/ftypes/excel-a65d2dcd2ad5675a8d043f4c6397d459.png);
    background-repeat: no-repeat;
}

ul.file-list > li.tiff /* Tiff */ {
    background-image: url(/static-resources/img/ftypes/tiff-45acc6c19c944c9a3365c07900f61c4e.png);
    background-repeat: no-repeat;
}

/* utility for 200px height */
.height-200 {
    height: 200px;
    overflow: auto;
}

/* utility for setting flex: 1 - useful for ie11 fixes */
.flex-1 {
    flex: 1;
}

/* Home page document list items */
.topic {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

/* Form page status bars */
ul.form-status {
    padding-left: 0;
    list-style: none;
    margin-bottom: 0;
    display: flex;
}

ul.form-status li {
    flex: 0;
    text-align: center;
    display: none;
    justify-content: center;
    align-items: center;
    height: 40px;
    text-indent: -9999px;
    border-width: 0;
    border-color: #c7c7c7;
    background-color: #f8f9fa;
    border-right-style: dashed;
}

ul.form-status li.stepActive {
    display: flex;
    flex: 1;
    text-indent: 0;
    background-color: #f8f2a8;
}

ul.form-status li.stepComplete, ul.form-status li:last-child.stepActive {
    background-color: #c8f2ad;
}

/* Map container */
.mapContainer {
    border: 1px solid #dddddd;
    width: 100%;
    position: relative;
    min-height: 752px;
}

.angular-app {
    width: 100%;
}

.mapContainer iframe {
    height: 750px;
    min-height: 750px;
    min-width: 1020px;
    width: 100%;
    border: 0;
    margin-bottom: -6px;
}

.fill-angular-app-section {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.fill-angular-app {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
}

.fill-angular-app iframe {
    width: 100%;
    min-height: 75vh;
    flex-grow: 1;
    border: none;
    margin: 0;
    padding: 0;
}

.mapFrame {
    overflow: auto;
    flex: 1;
    position: relative;
}

.mapContainer.expandedMap iframe {
    height: 100%;
}

.mapContainer.expandedMap {
    position: fixed;
    min-height: auto;
    height: 100vh;
    width: 100%;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    border: 0;
}

.mapContainer .map-return {
    width: 100vw;
    display: none;
    background-color: white;
}

.mapContainer.expandedMap .map-return {
    display: block;
}

.mapPanHelper {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    min-height: 750px;
    min-width: 1020px;
    width: 100%;
    left: 0;
    background-color: rgba(0,0,0,0.5);
}

.expandedMap .mapPanHelper.showPanHelper {
    display: block;
}

.mapPanIndicator {
    position: fixed;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    display: none;
    z-index: 100;
}

.mapPanIndicator i {
    color: white;
    font-size: 4rem;
}

.mapPanIndicator p {
    background-color: #0000008c;
    padding: 0 2px;
    border-radius: 5px;
}

/* Accessibility fixes */
a, .btn-link {
    color: #005ebc;
}

.btn-link-bold {
    color: #005ebc;
    font-weight:bold;
}

/* form.profile-form targeting the bootstrap menu & dropdown providing criteria overrides */
form.profile-form .navbar-nav .dropdown-menu {
    position: absolute !important;
}

form.profile-form .collapse {
    display: contents;
}

form.profile-form.form-inline {
    flex-flow: nowrap !important;
}

form.profile-form .nav-link:hover {
    text-decoration: underline;
}

form.profile-form .navbar-light .navbar-nav .nav-link {
    color: #005ebc !important;
}

form.profile-form .navbar {
    flex-wrap: nowrap;
    padding: 0 !important;
}

form.profile-form .nav-link {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

form.profile-form .dropdown-menu .dropdown-item {
    color: #005ebc !important;
}

.page-link {
    color: #005ebc !important;
}

.page-item.active .page-link {
    color: #fff !important;
    background-color: #0068d6;
}

.navbar-dark .navbar-nav .nav-link {
    color: white !important;
}

.navbar-light .navbar-nav .nav-link {
    color: rgba(0, 0, 0, 0.54) !important;
}

.btn-primary {
    background-color: #006fe6 !important;
}

.btn-info {
    background-color: #128091 !important;
}

.btn-outline-secondary {
    color: #545454 !important;
}

.btn-success {
    background-color: #218739 !important;
}

.badge-info {
    background-color: #117C8D !important;
}

.badge-success {
    color: white !important;
    background-color: darkgreen !important;
}

.hide {
    display: none;
}

.no-wrap {
    white-space: nowrap;
}

.btn-spacer {
    margin-left: 2px;
}

.menu-item-separator {
    color: grey;
}

.no-top-border th {
    border-top: none;
}

.grid td {
    display: block;
    float: left;
    width: 100%;
    box-sizing: border-box;
}
.grid td:nth-child(1n+2) {
    clear: left;
}

.grid td label {
    margin-left: 10px;
}

.small-label {
    font-size: 1rem;
}

label[for="equalityMonitoringInformationForm:dateOfBirth:input"] {
    all: unset;
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}
