/*! 
 * RaztelTNB
 * Apply for default styling
 *
 * @author hakimi <hakimi@rekaway.com> 
 * @version 1.0.0
 * @license MIT 
 */

:root {
    --primary-color: #010101;
    --secondary-color: #333;
    --highlight-color: #056cb8;
    --bg-color: #f8f9fb;
    --bg-lightgray: #e7ebf0;
    --redclr: #f60014;
    --bg-blue-color: #0060b4;
}

body {
    font-family: Arial;
    margin: 0px;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0px;
}

#container {
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    gap: 20px;
    align-items: center;
}

#container > .inner {
    width: calc(100% - 40px);
    overflow-x: auto;
}

iframe {
    width: calc(100% - 40px);
    border: none;
}

.msg {
    padding: 10px;
    background: tomato;
    border-radius: 7px;
    width: fit-content;
}

.overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2;
    cursor: pointer;
    overflow: auto;
}

.overlay>* {
    margin: auto;
    min-width: 200px;
    background: white;
    padding: 20px;
    border-radius: 10px;
    cursor: default;
}

@media print {

    .no-print {
        display: none !important;
    }

    .no-print-hide {
        visibility: hidden !important;
    }


    table,
    td,
    th {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* 1. Force a new page for every major section */
    section, .new-page {
        break-before: page;
        page-break-before: always; /* Legacy support */
    }

    .page-break {
        break-after: always;
        page-break-after: always;
    }

    /* 2. Prevent images, tables, and charts from splitting */
    img, table, canvas, .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* 3. Keep headings with their following paragraph */
    h1, h2, h3, table {
        break-after: avoid;
        page-break-after: avoid;
    }

    /* 4. Reset margins for the PDF page */
    @page {
        size: A4;
        margin: 20mm;
    }
}

@media screen {
    .page-break {
        margin-bottom: 40mm;
    }
}



/* label */
.label-green {
    font-size: 14px;
    color: green;
    background: rgb(153, 202, 175);
    width: fit-content;
    padding: 7px 10px;
    border-radius: 5px;
}

.label-red {
    font-size: 14px;
    color: red;
    background: rgb(224, 167, 167);
    width: fit-content;
    padding: 7px 10px;
    border-radius: 5px;
}

.label-orange {
    font-size: 14px;
    color: orangered;
    background: rgb(241, 200, 184);
    width: fit-content;
    padding: 7px 10px;
    border-radius: 5px;
}



/* button styling */
button,
.btn {
    display: inline-block;
    text-decoration: none;
    font-size: 14px;
    padding: 7px;
    border-radius: 5px;
    color: white;
    background: gray;
    border: 2px solid gray;
}

button:hover,
.btn:hover {
    color: gray;
    background: none;
}

.btn-blue {
    color: white;
    background: dodgerblue;
    border: 2px solid dodgerblue;
}

.btn-blue:hover {
    color: dodgerblue;
    background: none;
}

.btn-yellow {
    color: white;
    background: #BA8E23;
    border: 2px solid#BA8E23 !important;
}

.btn-yellow:hover {
    color: #BA8E23;
    background: none;
}

.btn-red {
    color: white;
    background: red;
    border: 2px solid red;
}

.btn-red:hover {
    color: red;
    background: none;
}

.btn-img {
    display: inline-block;
    text-decoration: none;
    padding: 0px;
    opacity: 50%;
    background: none;
    border: none;
}

.btn-img:hover {
    opacity: 100%;
}



.table00 {
    width: 100%;
    border: 1px solid;
    border-collapse: collapse;
}
.table00 td, .table00 th {
    height: fit-content;
    padding: 7px;
}

/* for material consumption report table */
.table01 {
    width: 100%;
    border: 1px solid;
    border-collapse: collapse;
}
.table01 td, .table01 th {
    height: fit-content;
    padding: 4px;
}

thead, tbody, tfoot, tr, td, th {
    border: inherit;
}






.hover-highlight tr:hover td {
    background: var(--bg-lightgray);
}

td[nowrap],
th[nowrap] {
    text-wrap: nowrap;
}

th.rotate,
td.rotate {
    rotate: 180deg;
    transform-origin: center;
    writing-mode: vertical-rl;
    text-align: left;
}

[fit-content] {
    width: fit-content;
}

div.rotate {
    transform: rotate(-90deg) translate(-100%, 0);
    transform-origin: left top;
}





/* tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    /*border-bottom: 1px dotted black;*/
    cursor: pointer;
}

.tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: black;
    color: #ffffff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: calc(100% + 5px);
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.5s ease;
    transition-delay: 500ms;
}
.tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: black transparent transparent transparent;
}

.tooltiptext-right {
    visibility: hidden;
    width: fit-content;
    background-color: black;
    color: #ffffff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 0;
    left: calc(100% + 5px);
    opacity: 0;
    transition: opacity 0.5s ease;
    transition-delay: 500ms;
    white-space: nowrap;
}
.tooltiptext-right::after {
    content: "";
    position: absolute;
    top: calc(50% - 5px);
    left: -5px;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent black transparent transparent;
}



.tooltip:hover .tooltiptext, .tooltip:hover .tooltiptext-right {
    visibility: visible;
    opacity: 1;
}



[href] {
    cursor: pointer;
}






/* form styling */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

form>div {
    display: flex;
    gap: 10px;
    align-items: center;
}

form label {
    text-wrap: nowrap;
}

form input:not([type='checkbox']),
form select,
form textarea {
    font-size: 16px;
    width: 100%;
    padding: 7px;
    border: 1px solid black;
    border-radius: 5px;
}

form input:focus, form select:focus, form textarea:focus,
form input:active, form select:focus, form textarea:focus {
    background: rgb(230, 248, 255);
    border: 1px solid dodgerblue;
    outline: 1px solid dodgerblue;
}

form select option, form select optgroup {
    background: white;
}

form select,
form input[type='date'] {
    width: fit-content;
}





/* table */

.tbl {
    display: flex;
    flex-direction: column;
    border: 1px solid gray;
    border-radius: 10px;
    overflow: hidden;
}

.tbl table {
    width: 100%;
    border: none;
    border-collapse: collapse;
}

.tbl th {
    padding: 15px;
    border-bottom: 2px solid gray;
}

.tbl th:hover {
    background: #e3e6e9;
}

.tbl tr:hover td {
    color: black;
    background: #e3e6e9;
}

.tbl td {
    padding: 15px;
    color: gray;
    border: none;
    border-bottom: 1px solid gray;
}


.tbl > div {
    padding: 10px;
    flex-wrap: wrap;
}

.tbl > div:first-child {
    display: flex;
    gap: 20px;
}

.tbl .div-table {
    width: 100%;
    padding: 0px;
    overflow-x: auto;
}

.tbl .footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.tbl .footer .btn-list {
    border: 1px solid gray;
    border-radius: 5px;
    gap: 0px;
}

.tbl .footer .btn-list button:not(:last-child) {
    border-right: 1px solid gray;
}

.tbl .footer button {
    font-weight: bold;
    color: gray;
    background: none;
    border: none;
    border-radius: 0px;
}

.tbl .footer button:not([active]):hover {
    color: black;
}

.tbl .footer button[active] {
    color: dodgerblue;
    background: #e2efff;
}

.div-filter {
    display: none; 
    position: absolute; 
    right: 0; 
    color:black; 
    flex-direction: column;
    align-items: flex-start; 
    background: white; 
    border: 2px solid black;
    padding: 10px;
}

.tbl .btn-filter:hover .div-filter {
    display: flex;
}






.img-sq-200 {
    border: 1px solid black;
    border-radius: 10px;
    width: 200px;
    height: 200px;
    object-fit: cover;
}

.img-sq-150 {
    border: 1px solid black;
    border-radius: 10px;
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.img-sq-100 {
    border: 1px solid black;
    border-radius: 10px;
    width: 100px;
    height: 100px;
    object-fit: cover;
}




/* live-view */

live-view {
    width: 100%;
}

live-blade:empty {
    display: block;
    min-width: 10px;
    min-height: 10px;
    background: lightgray;
}

.a4-portrait {
    background: white;
    width: calc(210mm - 40mm);
    min-height: calc(297mm - 40mm);
    padding: 30mm;
}

.a4-landscape {
    background: white;
    width: calc(297mm - 40mm);
    min-height: calc(210mm - 40mm);
    padding: 30mm;
}

input[type='number'][digit='7'] {
    max-width: 100px;
}