
@keyframes closeLid {
    0% {
        max-height: 850px;
    }
    100% {
        max-height: 0;
    }
}

/* Debug Env */
#container {
    margin: 50px;
    font-family: sans-serif;
}

/* --- Floating Messages --- */

#structclient-message-container {
    position: fixed;
    bottom: 50px;
    left: 50px;
    z-index: 90;
}

#structclient-message-container .structclient-message {
    cursor: pointer;
    display: block;
    width: 300px;
    font-family: sans-serif;
    padding: 25px;
    border: 1px solid;
    border-radius: 2px;
    margin-top: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

#structclient-message-container .structclient-message.colors-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

#structclient-message-container .structclient-message.colors-warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
}

#structclient-message-container .structclient-message.colors-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}

#structclient-message-container .structclient-message.colors-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

/* --- Messages at the bottom of the form --- */

#structclient-bottom-message-container {
    margin-top: 20px;
}

.structclient-section {
    display: block;
    margin: 5px 0;
}

.structclient-section .structclient-section-menubar,
.structclient-section .structclient-section-menubar-auxiliary {
    font-size: 12px;
    margin: 0 0 5px 0;
}

.structclient-section .structclient-section-menubar-auxiliary {
    margin: 5px 0 0 0;
    text-align: end;
}

.structclient-section .structclient-section-menubar a,
.structclient-section .structclient-section-menubar-auxiliary a {
    font-size: 12px;
    padding: 0.5rem 1rem;
    margin: 0 0 0 10px;
}

.structclient-section .structclient-section-menubar a {
    margin: 0 10px 0 0;
    text-decoration: underline;
}

.structclient-section .structclient-section-container {
    background-color: #EFEFEF;
    padding: 10px;
    /* Override the negative margin from bootstraps .row class */
    margin: 0 !important;
}

/**
 * Fancy little delete animation. To enable, just apply the class in deleteSection, line 3:
 * this.sections[sectionId].elem.addClass('is-deleted');
 * Also, .structlient-section needs "overflow: hidden" for this to work.
 * Remember to remove the class in the multiple fail cases of deleteSection.
 */
.structclient-section.is-deleted {
    max-height: 0;
    animation: closeLid 1s;
}

.structclient-section.is-deleted .structclient-section-container {
    background-color: #C73838;
    color: white;
    opacity: 0.75;
}

.structclient-section.is-collapsed .structclient-section-menubar-auxiliary,
.structclient-section.is-collapsed .structclient-section-description,
.structclient-section.is-collapsed .structclient-section-container {
    display: none;
}

.structclient-field {

}

.structclient-field.structclient-field-corrupt label {
    /*color: orangered;*/
}

.structclient-field.structclient-field-corrupt .structclient-field-input {
    border-color: #a94442;
    border-width: 3px;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}

.structclient-field label {
    font-weight: 600;
    margin-top: 10px;
    display: inline-block;
}

.structclient-field .structclient-field-input {
    /*background-color: #e6e6e6 !important;*/
    background-position: 380px;
    color: #5d5e60 !important;
    border: 1px solid #d5d5d5;
    border-radius: 0 2px 2px 0;
    height: 30px;
    padding: 4px 8px;
    display: block;
}

.structclient-field .structclient-field-input::-ms-clear {
    display: none;
}

/* --- Field specific adjustments --- */

.structclient-field textarea.structclient-field-input {
    height: auto;
}

.structclient-field .structclient-field-input-inline {
    display: inline-block;
    vertical-align: top;
}

.structclient-field .structclient-field-label-inline {
    display: inline-block;
    vertical-align: top;
    margin: 0 0 0 10px;
}

.summary-structural-data-container.edit-mode .edit-button .default-mode,
.summary-structural-data-container.edit-mode .summary-structural-data-container-collapsible,
.summary-structural-data-container:not(.edit-mode) .edit-button .edit-mode,
.summary-structural-data-container:not(.edit-mode) .editable-structural-data-container {
    display: none;
}

/* -- Image uploader -- */

.structclient-field .structclient-field-upload {
    margin-bottom: 10px;
    background-color: #E2E2E2;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2) inset;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.structclient-field .structclient-field-upload.uploading {
    pointer-events: none;
    cursor: not-allowed;
}

.structclient-field .structclient-field-upload-item {
    flex: 0 0 33.3%;
    position: relative;
    display: none;
}

.structclient-field .structclient-field-upload-item:after {
    content: '';
    display: block;
    padding-bottom: 100%;
    height: 0;
}

@media (max-width: 35rem) {
    .structclient-field .structclient-field-upload-item {
        flex: 0 0 50%;
    }
}

@media (max-width: 25rem) {
    .structclient-field .structclient-field-upload-item {
        flex: 0 0 100%;
    }
}

.structclient-field .structclient-field-upload-item-image {
    background: center no-repeat;
    background-size: cover;
    display: none;
}

.structclient-field .structclient-field-upload-item:not(.empty) .structclient-field-upload-item-image,
.structclient-field .structclient-field-upload.uploading .structclient-field-upload-item-uploading,
.structclient-field .structclient-field-upload-item-prompt {
    display: flex !important;
}

.structclient-field .structclient-field-upload-item:not(.empty),
.structclient-field .structclient-field-upload.editable .structclient-field-upload-item:not(.empty) + .structclient-field-upload-item,
.structclient-field .structclient-field-upload.editable .structclient-field-upload-item:first-of-type {
    display: block !important;
}

.structclient-field .structclient-field-upload-item-inner {
    background-color: #fff;
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    border-radius: 1rem;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.structclient-field .structclient-field-upload-pdf-item-inner {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    border-radius: 1rem;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.structclient-field .structclient-field-upload-pdf
{
    margin-top: 10px;
    margin-bottom: 10px;
    min-height: 35px;
}

.structclient-field .structclient-field-upload-item-prompt {
    cursor: pointer;
    color: #000;
}

.structclient-field .structclient-field-upload-item-prompt i {
    margin-bottom: 1.5rem;
    font-size: 3rem;
    display: block;
}

.structclient-field .structclient-field-loader.processing {
    display: flex !important;
}

.structclient-field .structclient-field-loader i {
    color: gray;
}

.structclient-field .structclient-field-image-rotate-button,
.structclient-field .structclient-field-image-edit-description-button,
.structclient-field .structclient-field-image-delete-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 2rem !important;
    font-size: 1rem;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    height: 2rem;
    text-align: center;
    cursor: pointer;
    color: #000;
    background-color: #fff;
    border-radius: 1rem;
}

.structclient-field .structclient-field-image-rotate-button {
    top: auto;
    bottom: 1.5rem;
}

.structclient-field .structclient-field-image-edit-description-button {
    top: auto;
    left: 1.5rem;
    bottom: 1.5rem;
}

body .structclient-field-upload-item:not(.empty) .structclient-field-image-delete-button,
body .structclient-field-upload-item:not(.empty) .structclient-field-image-edit-description-button,
body .structclient-field-upload-item:not(.empty) .structclient-field-image-rotate-button {
    display: flex !important;
}

/* -- Image uploader Old -- */

.structclient-field .structclient-field-upload-old {
    margin-bottom: 10px;
    padding: 20px;
    background-color: #E2E2E2;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2) inset;
}

.structclient-field .structclient-field-upload-old .structclient-field-upload-preview {
    background-size: cover;
    height: 130px;
    background-position: 50% 50%;
    width: 130px;
    background-repeat: no-repeat;
    margin: 15px;
}

.structclient-field .structclient-field-upload-old .structclient-field-upload-form {
    display: flex;
    align-items: center;
}

.structclient-field .structclient-field-upload-old .structclient-field-upload-form span {
    flex: 1 1 auto;
    display: block;
}

.structclient-field .structclient-field-upload-old .structclient-field-upload-form button {
    flex: 0 0 auto;
}

.structclient-field .structclient-field-upload-old .structclient-field-upload-form.hidden {
    display: none;
}

.structclient-field .structclient-field-upload-old .structclient-field-upload-form .structclient-field-label-inline {
    font-weight: normal;
}

.structclient-field .structclient-field-upload-old .structclient-image-info {
    margin: 15px 15px 0;
}

.structclient-field .structclient-field-upload-old .structclient-field-image-button {
    margin: 15px;
}

.structclient-field .structclient-field-upload-old img.raw-image-preview {
    max-height: 200px;
}

.structclient-field .structclient-field-upload-old .structclient-field-uploaded-image {
    display: flex;
    flex-direction: row;
}

.structclient-field .structclient-field-upload-old .structclient-field-uploaded-image.hidden {
    display: none;
}

.structclient-field .structclient-field-upload-old .structclient-field-uploaded-image-info {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    flex: 1 1 auto;
}

.structclient-help-icon-div
{
    margin-left: 10px !important;
}

.edit-description-image-preview {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.edit-description-image-preview img {
    max-width: 100%;
    max-height: 200px;
}

.structclient-field-upload-item[data-has-description="1"] .structclient-field-image-edit-description-button {
    background: #5d5d5d;
    color: white;
}
