/*  CSS for Nothum Manufacturing
    Created on 03/02/2020 */

/* Default styling for html elements */    
label {
    font-weight: 600;
}
    
input[type="text"], input[type="tel"], input[type="number"], 
input[type="date"], input[type="time"], 
input[type="email"], input[type="password"], select {
    margin-bottom: 0px;
    height: 24px;
    padding: 0 4px;
    box-sizing: border-box;
}
input[type="number"] {
    -moz-appearance: textfield;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="date"] {
    width: 95px;
    padding-right: 0;
}
input[type="time"] {
    width: 105px;
    padding-right: 0;
}
/* Remove margin from calendar icon on date/time input */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    margin: 0;
}
/* Remove dropdown arrow from text input with datalist */
input[type="text"]::-webkit-calendar-picker-indicator {
    display: none !important;
}
select {
    width: auto;
}
textarea {
    margin: 0;
    line-height: 1.3em; 
    padding: 0 4px;
}

/* Table styling */   
.btimes {
    width: 100%;
    border-collapse: separate;
    font-size: 12px;
}
.btimes tr:hover:not(.nohover) {
    background-color: #b3d6f0 !important;
    color:black;
}
.nohover:hover {
	background-color: initial !important;
}
.btimes tbody td, .btimes thead td {
    border-style: solid;
    border-color: rgba(204, 204, 204, 0.6);
    border-width: 0 0 1px 0;
    padding: 2px 5px;
}
.btimes tbody tr:last-child td {
    border-width: 0;
}
.btimes thead th, .employeehead {
    font-weight: bold;
    text-align: left;
    height: 30px;
    padding: 0 5px;
    background-color: #ddd;
    position: sticky !important;
    top: 0;
    z-index: 25;
}
.btimes tfoot, .tfoot {
    background-color: #eee;
}
.btimes tfoot td, .tfoot td {
    font-size: 11px;
    padding: 0 5px;
    border-width: 0 !important;
}
.btimes.fill-up {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 0;
}
.btimes tr.noborder td {
    border-bottom: none;
}
.employeehead {
    font-weight: 600;
    font-size: 13px;
    border-top: 3px solid #ccc;
    border-bottom: 1px solid #ccc;
    background-color: #fefefe;
    top: 30px; 
}
.column-225 {
    width: 225px;
}
.column-160 {
    width: 160px;
}
.column-100 {
    width: 100px;
}

/* CSS Helpers */
.nowrap {
    white-space: nowrap;
}
.overflow {
    overflow: auto;
}
.overflow-visible {
    overflow: visible;
}

/* Once all date inputs are converted from text to date this can be removed */
.date-input {
    max-width: 100px;
    max-height: 20px;
}

/* Typeahead fixes */
.twitter-typeahead {
    margin: 0;
    padding: 0;
}
input[disabled].tt-hint {
    background-color: white !important;
    width: 100%;
}
.control-group>.twitter-typeahead {
    width: 100%;
}
.inv-field {
    width: 100%;
}

/* Pop-up Add-on */
#helpicons {
    position: fixed;
    bottom: 0;
    right: 0;
    margin: 15px;
    padding: 0;
}
#helpicons button {
    margin-left: 5px;
    padding: 5px 10px 8px 10px;
    z-index: 1049;
}
#helpicons span {
    vertical-align: middle;
}
#popup {
    background-color: rgba(0,0,0,0.4);
    position: fixed;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    z-index: 1000;
    -webkit-transition: 0.3s ease-in-out; 
    -moz-transition: 0.3s ease-in-out; 
    -o-transition: 0.3s ease-in-out; 
    transition: 0.3s ease-in-out;
    overflow: hidden;
}
#popup .box {
    height: auto;
    max-height: 100%;
    margin: 0 auto;
    overflow: hidden !important;
}
#popup .box-content {
    overflow: auto !important;
}
#popup .title {
	padding: 7px;
}
#popup .fa-times {
    cursor: pointer; 
    margin: 7px;
    float: right;
    padding: 3px;
}

/* Modal */
.newModal.modal {
    margin: 0;
    position: fixed;
    width: calc(100% - 50px);
    left: 50%;
    transform: translateX(-50%);
    box-sizing: border-box;
}
.newModal .modal-header, .modal-footer {
    margin: 0;
    padding: 7px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}
.newModal .modal-header .close {
    margin: 0;
}
.newModal .modal-body {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    height: 100%;
}
.newModal .modal-body #viewer {
    border: none;
    width: 100%;
    height: 100%;
}
.newModal .modal-footer {
    position: absolute;
    bottom: 0px;
    left: 0px;
    width: 100%;
}

/* Animated spinner */
@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
.spin::before {
    animation: 1.25s linear infinite spinner;
    animation-play-state: inherit;
    border: solid 5px #cfd0d1;
    border-bottom-color: #1c87c9;
    border-radius: 50%;
    content: "";
    height: 10px;
    position: absolute;
    width: 10px;
}

/* Checkbox */
.checkbox {
    --background: #3c91bc;
    --border-active: white;
    position: relative;
    margin: 4px;
    vertical-align: middle;
}
.checkbox:has(input[type="radio"]) {
    padding-left: 0;
}
.checkbox input, .checkbox svg {
    width: 21px !important;
    height: 21px !important;
    display: block;
}
.checkbox input {
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    outline: none;
    background: #ddd;
    border: 1px solid black;
    margin: 0;
    padding: 0;
    cursor: pointer;
    border-radius: 4px;
    transition: box-shadow 0.3s;
}
.checkbox input:checked {
    background: var(--background);
    background-image: -webkit-gradient(linear,50% 0,50% 100%,color-stop(0%,#5ba5cb),color-stop(100%,#3c91bc));
    background-image: -webkit-linear-gradient(top,#5ba5cb,#3c91bc);
    background-image: -moz-linear-gradient(top,#5ba5cb,#3c91bc);
    background-image: -o-linear-gradient(top,#5ba5cb,#3c91bc);
    background-image: linear-gradient(top,#5ba5cb,#3c91bc);
    border: none;
    transition-delay: 0.4s;
}
.checkbox svg {
    pointer-events: none;
    fill: none;
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke: var(--stroke, var(--border-active));
    position: absolute;
    top: 0;
    width: 21px;
    height: 21px;
    transform: scale(var(--scale, 1)) translateZ(0);
}
.checkbox:has(input[type="checkbox"]) svg {
    left: 0;
} 
.checkbox input:checked + svg {
    --a: 16.1 86.12;
    --o: 102.22;
}
.checkbox svg {
    stroke-dasharray: var(--a, 86.12);
    stroke-dashoffset: var(--o, 86.12);
    transition: stroke-dasharray 0.6s, stroke-dashoffset 0.6s;
}

/* CSS Truncate (Needs to be used with BS_Foot in common/page.php) */
.truncate375 {
    max-width: 375px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.truncate275 {                         
    max-width: 275px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.truncate250 {                         
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.truncate150 {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.truncate100 {
    max-width: 125px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.truncate50 {
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Pagination links */
/* If the pagination is inside a div, the div it is in will need its position set to relative for the pagination to stick to the bottom of the div */
#pagination {
    margin: 0 !important;
    position: sticky;
    bottom: 0;
    background-color: #ddd;
    z-index: 40;
    padding: 5px 7px;
}
#pagination-excel {
    float: left;
    position: absolute;
    top: 0;
    left: 0;
    margin: 7px;
}
#pagination-excel #xlsbutton {
    height: 28px;
    cursor: pointer;
}
#pagination-pages {
    text-align: center;
}
#pagination-pages a {
    display: inline-block;
    padding: 5px;
    text-decoration: none;
    transition: background-color .3s;
    min-width: 18px;
    margin: 2px 1px;
    border-radius: 5px;
}
#pagination-pages a.active {
    background-color: dodgerblue;
    color: white;
}
#pagination-pages a:hover:not(.active) {
    background-color: white;
}
#pagination-lines {
    float: right;
    position: absolute;
    top: 0;
    right: 0;
    margin: 7px;
}

/* Font Awesome Default Colors */
.fa-file-pdf {
    color: crimson;
    cursor: pointer;
}
.fa-file-image {
    color: #15aabf;
    cursor: pointer;
}

@media only screen and (max-width: 1780px) {
    /* CSS Truncate (Needs to be used with BS_Foot in common/page.php) */
    .truncate375 {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .truncate275 {                         
        max-width: 225px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .truncate250 {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .truncate150 {
        max-width: 75px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .truncate100 {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
@media only screen and (max-width: 1024px) {
    /* CSS Truncate (Needs to be used with BS_Foot in common/page.php) */
    .truncate375 {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .truncate275 {                         
        max-width: 225px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .truncate250 {
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .truncate150 {
        max-width: 50px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .truncate100 {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media only screen and (max-width: 800px) {
    .table {
        overflow: scroll;
        overflow: -moz-scrollbars-none;
        -ms-overflow-style: none;
    }
    .table::-webkit-scrollbar {
        display: none;
    }
    
    /* Table styling */
    .btimes thead th {
        position: relative;
    }
    .employeehead {
        top: 0;
    }
}

@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait) {
    /* Table styling */
    .employeehead {
        top: 0;
    }
}

@media only screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape) {
    /* Table styling */
    .employeehead {
        top: 0;
    }
}
