/* Table form overall Styles */

.table-form-container {
    padding-left: 0;
    padding-right: 0;
}

.table-form-container .container {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
}

@media (min-width: 992px) {
    .table-form-container .container {
        padding-right: 3rem;
        padding-left: 3rem;
    }
    .paginated-form-trigger-container {
        border-right: 1px solid var(--light-gray);
    }
}

.table-form-container .table-form-section {
    background: white;
    padding: 15px;
    border-radius: 3px;
    border: 1px solid var(--white-accent);
}

.table-form-container .table-form-section,
.paginated-form-trigger-container {
    overflow: visible;
}

.paginated-form-trigger-container .button-menu-container {
    right: unset;
    left: 0px;
    z-index: 1060;
    width: 25rem;
}

.paginated-form-trigger-container .dropdown-menu {
    transform: none !important;
    will-change: unset !important;
    top: 0px;
    left: 0px;
    max-height: 30rem;
    overflow-y: auto;
    box-shadow: 1px 1px 2px #000000aa;
}

.paginated-form-trigger-container .dropdown-menu a,
.paginated-form-trigger-container .dropdown-menu i,
.paginated-form-trigger-container .dropdown-menu p {
    font-size: 1.8rem;
}


.table-form-container form p input,
.table-form-container form input {
    background-color: var(--lighter-gray);
    padding: 0.5rem;
}

.table-form-container form p input,
.table-form-container form input[type=file] {
    position: absolute;
    left: 0;
    width: 100%;
}

.table-form-container form .background--lighter-gray input {
    background-color: var(--lightest-gray);
    padding: 0.5rem;
}

.table-form-container form .form-group:not(.w-100),
.data-select-container {
    min-width: 15rem;
    width: 30%;
}


.table-form-container .custom-file {
    display: block !important;
    height: 4rem;
}

.table-form-container .custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 4rem;
    margin: 0;
    opacity: 0;

}

.table-form-container .custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: 4rem;
    padding: .375rem .75rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    pointer-events: none;
}

.table-form-container .table-file-container .custom-file-label {
    position: relative;
    text-align: left;
    z-index: 100;
}

.table-form-section .form-data-section label{
    display: none;
}


.custom-file-label {
    overflow-y: hidden;
}


.custom-file-label.has-val::before {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: block;
    padding: .375rem .75rem;
    line-height: 1.5;
    color: #fff;
    content: "Remove File";
    background-color: #e6413a;
    border-left: 1px solid #e6413a;
    border-radius: 0 .25rem .25rem 0;
    cursor: pointer;
}

.file-input-container {
    border: 1px solid #d6d6d6;
    line-height: 1.25;
}

.custom-file-label::after,
.file-input-container label::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: block;
    padding: .375rem .75rem;
    color: #495057;
    content: "Browse";
    background-color: #e9ecef;
    border-left: 1px solid #ced4da;
    border-radius: 0 .25rem .25rem 0;
    cursor: pointer;
}


.form-help-text {
    color: var(--light-blue)
}

.form-info {
    border: 1px solid var(--federal-blue);
    border-bottom: 2px solid var(--federal-blue);
    border-radius: 3px;
}

/* Table form Table styles */

.table-form-container table {
    z-index: 100;
    overflow-x: hidden;
}

.table-form-container .table td,
.table-form-container .table th {
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--federal-silver);
    vertical-align: middle;
    max-width: 25rem;
    min-width: 15rem;
    font-size: 1.8rem;
}

.table-form-container .table td p {
    word-wrap: break-word;
    max-width: calc(100% - 2.5rem);
}

.table-form-container td:first-of-type {
    padding: 1rem;
    text-align: left;
}

.table-form-container td:first-of-type {
    background-color: var(--lighter-gray);
}

.table-form-container .table th {
    background-color: var(--light-gray);
}

.table-form-container .table-borders thead th {
    border: 1px solid var(--federal-silver);
    border-top: 1px solid var(--federal-silver);
    border-bottom: 1px solid var(--federal-silver);
}

.table-form-container .table-file-head {
    font-weight: bold;
}

.table-form-container .table-file i {
    cursor: pointer;
}

.table-form-container .table-file-container {
    max-width: 60rem;
    height: fit-content;
    max-height: 60rem;
    border: 1px solid var(--dark-gray);
}

.table-form-container .table-formtable {
    min-width: 36rem;
}

.table-form-modal .modal-body {
    padding: 3rem 5rem;
}

.header-blank {
    opacity: 0;
}

.custom-close {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .5
}

.custom-close:focus,
.custom-close:hover {
    color: #000;
    text-decoration: none;
    opacity: .75
}

button.custom-close {
    padding: 0;
    background: 0 0;
    border: 0;
    -webkit-appearance: none
}


.form-data-section-file input {
    position: absolute;
    padding: 0 !important;
    margin: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0, 0, 0, 0);
    /* Deprecated but works for older browsers */
    clip-path: inset(50%);
    /* Better approach for modern browsers */
    white-space: nowrap;
    /* Prevents text from wrapping */
    overflow: hidden;
    opacity: 0;
}

.form-data-section-file label {
    position: absolute;
    background-color: var(--federal-blue) !important;
    color: white;
    font-size: 1.4rem;
    width: 20rem;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 0.5rem;
    border-radius: 3px;
    box-shadow: 0 0 3px var(--light-gray);
    z-index: 1000;
    word-break: break-word;
    pointer-events: none;
    top: 100%;
    left: 0;
}


.table-file-upload:hover~label {
    opacity: 1;
}

.related-file-count {
    height: 2rem;
    width: 2rem;
    font-size: 1.6rem;
    bottom: 10px;
    right: 3px;
    padding-left: 1px;
    line-height: 2rem;
    margin-bottom: 0;
    pointer-events: none;
    /* Mozilla struggles to put this in the correct spot. Therefore: */
    -moz-transform: translateY(-2px);
}


.file-input-container label {
    overflow-y: hidden;
    word-break: break-word;
    width: 80%;
    margin-bottom: 0;
    line-height: 1.25;
}

.file-input-container input {
    min-width: 14rem;
    max-width: 100%;
    height: calc(2.25rem + 2px);
    margin: 0;
    opacity: 0;
    max-height: 5rem;
}

.close-button {
    font-size: 2rem;
    cursor: pointer;
}

.form-loader {
    position: absolute;
    width: 100%;
    height: calc(100% + 37px);
    aspect-ratio: 1/1;
    z-index: 2000;
    opacity: 0.8;
    top: 0;
    left: 0;
}


.form-loader .form-loader-inner,
.form-loader .form-loader-text {
    position: fixed;
    top: 50vh;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 600;
}

#multifile-modal .modal-content{
    background-color: var(--lighter-gray);
}

.multifile-dropdown .dropdown-menu {
    max-height: 90vh;
    overflow-y: scroll;
    overflow-x: hidden;
    margin-bottom: 1rem;
    margin-top: 1rem;
    min-width: 25rem;
}

.multifile-dropdown .custom-control {
    width: 100%;
}

.multifile-dropdown label {
    height: auto;
}

.filename-container>div:first-of-type {
    width: 50%;
}

.filename-container>div:first-of-type p {
    max-width: 100%;
    word-break: break-all;
}

@media (max-width: 992px) {

    .table-form-container .table {
        table-layout: fixed;
        max-width: 100%;
    }

    .table-form-container .no-stack tbody td,
    .table-form-container .table th {
        margin: .5rem;
        padding: 1rem;
        padding-left: 0.5rem;
        font-size: 1.6rem;
        width: 100%;
        word-wrap: break-word;
    }

    .table-form-container table input {
        font-size: 1.6rem;
    }

    .filename-container>div:first-of-type {
        width: 70%;
    }

}

@media (max-width: 768px) {

    .table-form-container .no-stack tbody td,
    .table-form-container .table th {
        margin: .5rem;
        padding: 1rem;
        padding-left: 0.5rem;
        font-size: 1.2rem;
        width: 100%;
        word-wrap: break-word;
    }

    .table-form-container table input {
        font-size: 1.2rem;
    }
}



/* Paginated table form */


.table-form-container .table-file-head,
.table-file {
    width: calc(50% - 1rem);
    padding: 10px 5px;
    margin: 0;
    align-items: center;
    min-height: 6.2rem;
}


.paginated-section label,
.paginated-section .label p {
    font-size: 1.8rem;
}

.table-file {
    width: fit-content;
}

.paginated-table .td {
    padding: 1rem 0;
}

.paginated-form-trigger a {
    cursor: pointer;
}

.paginated-form-trigger.paginate-active a {
    cursor: pointer;
    text-decoration: underline;
}

.paginated-form-trigger.paginate-active a:hover {
    cursor: pointer;
    text-decoration: underline;
}

.paginated-form-trigger-list .btn {
    width: 25rem;
}

@media(min-width:768px) {
    .paginated-form-trigger-list {
        max-width: 50%;
    }
}


.paginated-form-trigger.paginate-complete, .paginated-form-trigger.paginate-complete a, .multifile-toggle.complete {
    color: var(--federal-green) !important;
}

.paginated-form-trigger {
    position: relative;
}

.paginated-form-trigger::before, .multifile-toggle::before {
    content: "\2751";
    position: absolute;
    font-size: 1.4rem;
    top: 5px;
    left: 5px;
}

.multifile-toggle::before {
    left: -2rem;
    top: 0rem;
}

.paginated-form-trigger.paginate-complete::before, .multifile-toggle.complete::before {
    content: "\2713";
}

.paginated-table .td-container .td {
    width: 100%;
}

.td.row-header p {
    max-width: 100%;
    word-break: break-word;
}

.form-paginator {
    max-width: 100vw;

}

#upload-files-btn, .paginate-btn {
    width: 22rem
}

@media (min-width: 992px) {
    .paginated-table .td-container .td {
            width: calc(50% - 2rem);
            min-width: 35rem;
        }
}

.form-paginator.paginated-form-show-all {
    .dropdown-menu {
        display: block !important;
        position: relative !important;
        box-shadow: none;
        max-height: none;
        min-width: unset;
    }
    .button-menu-container {
        position: relative;
        margin-top: -2px;
        border: 2px solid var(--navy);
        z-index: 0;
    }
}