@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

* { box-sizing: border-box;}
body { 
    margin: 0;
    background-color: #eeeeee; 
}
#app {
    background-color: #eeeeee;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 38px;
}


.link {
    cursor: pointer;
    color: darkblue;
    text-decoration: none;
}

.link:hover {
    color: #190c44;
}

.button {
    cursor: pointer;
    color: darkblue;
    transition: .2s ease;
}
.button:hover {
    color: #190c44;
}
.button:active {
    color: #0f0727;
    transform: translate(0, 1px);
}
.title {
    font-weight: bold;
    font-family: 'Arial Narrow Bold', sans-serif;
}
.close {
    padding: 0;
    margin: 0;
    font-size: 20pt;
    border: none;
    background: none;
    outline: none;
    cursor: pointer;
    color: darkred;
    transition: .2s ease;
}

.close:hover {
    color: #5c0000;
}
.close:active {
    color: #360404;
    transform: translate(1px, 1px);
}

.del-row {
    cursor: pointer;
    color: darkred;
    border: none;
    background: none;
    outline: none;
    margin-left: 10px;
}
.del-row:hover {
    color: #250202;
}
/* Navigation bar start */
#nav-bar {
    background-color: #e0e0e0;
    display: flex;
    order: -1;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

#nav-bar > ul {
    padding: 10px;
    margin: 0;

}
#nav-bar > ul.user-list {
    padding: 10px 30px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
}
#nav-bar > ul > li {
    display: inline-block;
    list-style: none;
}
#nav-bar > ul > li > a .text {
    font-family: 'Arial Narrow Bold', sans-serif;
    font-weight: bold;
    margin-left: 4px;
    font-size: 12pt;
}
#nav-bar > ul > li#page-links {
    margin: 0 20px 0 auto;
    width: max-content;
}
#nav-bar > ul > li#page-links a {
    font-family: 'Arial Narrow Bold', sans-serif;
    color: darkblue;
    text-decoration: none;
    margin: 0;
    padding: 10px 10px;
    font-weight: bold;
    font-size: 12pt;
}
#nav-bar > ul > li#page-links a:hover {
    text-decoration: underline;
}
#nav-bar > ul > li#page-links a.current {
    background-color: #00000020;
}
#nav-bar > ul > li#nav-username {
    margin: 0;
    width: max-content;
}

/* App display */
#app-display {
    display: flex;
    flex-grow: 1;
}

#app-display #nav-date {
    padding: 10px 20px;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 20px;
    order: 1;
    background-color: #e0e0e0;
    border-top: 2px solid #01010140;
    border-right: 2px solid #01010140;
    transition: .3s ease;
    transform: translateX(0%)
}
#app-display.collapsed #nav-date {
    transform: translateX(-100%);
}
#app-display #toggle-btn {
    position: absolute;
    align-self: flex-end;
    width: 0px;
    height: 80px;
    padding: 0;
    /* transform: translate(38px, -10px); */
    transform: translate(22px, -10px);
    outline: none;
    color: darkblue;
    cursor: pointer;
    background: none;
    display: grid;
    place-items: center;
    
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 0 solid transparent;
    border-right: 18px solid #acafbc;
}
#app-display.collapsed #toggle-btn {
    transform: translate(38px, -10px);
    
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 18px solid #acafbc;
    border-right: 0px solid transparent;
}
#app-display.collapsed #toggle-btn::before {
    position: absolute;
    transform: translateX(-9px);
}
#app-display #toggle-btn::before {
    position: absolute;
    transform: translateX(10px);
}
#app-display #toggle-btn:hover {
    border-right-color: #81869c;
}
#app-display.collapsed #toggle-btn:hover  {
    border-left-color: #81869c;
}

#date-row {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}
#date-row > table {
    order: 1;
}
#date-row > button.link {
    order: 3;
    background:none;
    outline: none;
    border: none;
    font-size: 22pt;
    align-self: flex-end;
    margin-right: 20px;
    padding:  10px 0;
}
#date-row > button.link:hover {
    text-decoration: none!important;
}

#date-row > .date-item {
    display: inline-block;
    width: fit-content;
}
#date-row > .date-item * {
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}
#date-row > .date-item td {
    text-align: center;
    text-transform: uppercase;
}

#date-row > .date-item #time-day {
    width: 2em;
}
#date-row > .date-item #time-month {
    width: 2em;
}
#date-row > .date-item #time-year {
    width: 4em;
}
#date-row > .date-item .time {
    height: 1.6em;
    text-align: center;
    padding: 10px;
    margin: 0;
    
    font-size: 20pt;
    outline: none;
    border: none;
    background-color: whitesmoke;
    transition: .2s ease;
    border-width: .12em;
    border-style: ridge;
    border-color: #0000001c;
    color: #2f2f2f;

    /* hide controls on firefox */
    -moz-appearance: textfield;
}
#date-row > .date-item .time:hover {
    border-color: #00000042;
}
#date-row > .date-item .time:focus {
    background-color: white;
    border-color: #2f2f2f;
    color: #000000bc;
}
/* hide controls */
#date-row > .date-item .time::-webkit-outer-spin-button,
#date-row > .date-item .time::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
#date-row > .date-item .time::after {

}

/* Date-time-calendar */
#date-time-calendar {
    order: 10;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
#date-time-calendar .dt-calendar-row {
    display: flex;
}
#date-time-calendar .dt-calendar-row button {
    font-size: 22pt;
    color: darkblue;
    background: none;
    outline: none;
    border: none;
    cursor: pointer;
    padding: 0!important;
}
#date-time-calendar .dt-calendar-row button:hover {
    color: #2f2f2f;
}


#date-time-calendar .card-top {
    display: flex!important;
    justify-content: space-between!important;
}
#date-time-calendar .card-top .card-top-c-nav {
    order: 1;
    padding: 0 10px;
}
#date-time-calendar .card-top button {
    cursor: pointer;
    font-size: 16pt;
    background: none;
    border: none;
    outline: none;
    color: darkblue;
}
#date-time-calendar .card-top button:hover {
    color: #2f2f2f;
}
#date-time-calendar .card-top button.first {
    order: -1;
}
#date-time-calendar .card-top button.last {
    order: 2;
}

.card-top-c-nav .dt-time-tag {
    font-family: 'Arial Narrow Bold', sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 16pt;
}

#date-time-calendar .dt-days-table {
    padding: 10px 0;
    display: grid;
    grid-template-columns: repeat(7, 44px);
    grid-template-rows: repeat(6, 38px);
}
#date-time-calendar .dt-days-table.rows-6 {
    grid-template-rows: repeat(6, 38px);
}

#date-time-calendar .dt-days-table button {
    background-color: whitesmoke;
    border: 1px solid #01010140;
    outline: none;
    cursor: pointer;
    font-family: 'Arial Narrow Bold', sans-serif;
    font-size: 12pt;
}
#date-time-calendar .dt-days-table button:hover {
    background-color: #dfdff1;
}
#date-time-calendar .dt-days-table button.current-day {
    background-color: #dfdff1;
    border: 2px solid darkblue;
    color: darkblue;
}


/* Navigation bar end */


/* new order card */
#new-order-card {
    order: 1;
    margin: 0;
    background-color: #e0e0e0!important;
    width: 100%;
    max-width: 680px;
    border: 2px solid #01010140;
}

.card-top {
    display:flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
}
#new-order-card .card-top {
    padding-right: 0!important;
}

#new-order-card .card-top .close {
    height: fit-content;
    height: -moz-fit-content;
}
.card-top .card-top-title {
    font-weight: bold;
    text-transform: uppercase;
    padding-right: 20px;
}

.card select {
    margin: 10px 0;
}
.card #asiakas-loadstatus {
    margin-left: 10px;
}

.card .card-rows {
    display: flex;
    flex-direction: column;
    padding: 0 8px;
    margin: 0;
}

.card .card-rows > li {
    list-style: none;
}

.card .card-rows > li::marker {
    font-weight: bold;
}
.card .card-rows > li.card-row {
    padding: 8px 0;
    display: flex;
    align-items: center;
}

.card .card-rows > li.card-row button {
    padding: 4px;
}
.card .card-rows > li > h3 {
    display: inline-block;
    margin: 0;
    margin-right: 10px;
}

.new-customer-card {
    display: block;
}

.new-customer-card .input-block {
    display: block;
}   

#order-card {
    padding: 10px;
    margin-top: 10px;
}
#order-card table {
    border-spacing: 14px 4px;
}

#order-card :is(.c-1) {
    width: 180px;
}
#order-card :is(.c-5) {
    width: 140px;
}
#order-card :is(.c-3, .c-4) {
    width: 100px;
}

#order-card input {
    width: 100%;
}
#order-card .empty {
    margin: 20px 0 15px;
    padding: 0;
    height: 2px;
    width: 100%;
    display: block;
    background-color: #868686;
}
#order-card .add-row {
    margin: 10px 0;
}
#order-card button {
    padding: 4px;
}

/* Orders for the date */

#app-display #orders-for-date {
    /* position: relative; */
    order: 10;
    background-color: #eeeeee;
    border-top: 2px solid #01010150;
    width: 100%;
    margin: 0;
    padding: 0 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: .3s ease;
}
#app-display.collapsed #orders-for-date {
    margin-left:-350px;
}

#orders-date {
    display: flex;
    width: 100%;
    padding: 25px 10px 10px 16px;
    align-items: center;
}

#orders-date * {
    margin: 0;
    text-align: center;
}

#orders-date > button {
    background: none;
    border: none;
    outline: none;
    font-size: 22pt;
    transition: .2s ease;
    color: darkblue;
    cursor: pointer;
    margin: 0 10px;
}
#orders-date > button:hover {
    color: #2f2f2f;
}

#orders-date .date-title {
    margin: 0 20px 0 0;
    text-align: center;
    font-family: 'Arial Narrow Bold', sans-serif;
}

#orders-table {
    padding-left: 10px;
    padding-right:10px;
}
#orders-table .single-order {
    display: flex;
    margin-bottom: 16px;
}

#orders-table .grid-box {
    display: grid;
    grid-template-columns: 180px 100px 200px 110px 115px 60px 120px 140px;
    column-gap: 4px;

    border-bottom: 1px solid #01010140;
    padding-top: 2px;
    padding-bottom: 2px;
    padding-left: 4px;
    padding-right:4px;
}
#orders-table .grid-box.headers {
    margin-bottom: 10px;
    border-bottom: none;
}
#orders-table .grid-box.t-row:hover {
    background-color: #f8f8f8;
}
#orders-table .grid-box.totals {
    background-color: #f8f8f8;
    padding-top:    6px;
    padding-bottom: 6px;
}
#orders-table .grid-box input.t-maara {
    width: 80px;
    outline: none;
    text-align: center;
    -moz-appearance: textfield;
    font-family: 'Times New Roman', Times, serif;
    font-size: 16px;
    padding: 0;
    background-color: transparent;
    border-color: transparent;
    border-width: 1px;
    transition: .2s ease;
} 
#orders-table .grid-box input.t-maara::-webkit-outer-spin-button,
#orders-table .grid-box input.t-maara::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
#orders-table .grid-box input.t-maara:hover {
    background-color: #ffffff;
    border-color: #00000060;
}
#orders-table .grid-box input.t-maara:focus {
    background-color: #ffffff;
    border-color: #00000080;
}
/* tilaus asiakasviite */
#orders-table .grid-box input.t-aviite {
    outline: none;
    -moz-appearance: textfield;
    font-family: 'Times New Roman', Times, serif;
    font-size: 16px;
    padding: 0;
    background-color: transparent;
    border-color: transparent;
    border-width: 1px;
    transition: .2s ease;
} 
#orders-table .grid-box input.t-aviite::-webkit-outer-spin-button,
#orders-table .grid-box input.t-aviite::-webkit-inner-spin-button {
    -webkit-appearance: none;
}
#orders-table .grid-box input.t-aviite:hover {
    background-color: #ffffff;
    border-color: #00000060;
}
#orders-table .grid-box input.t-aviite:focus {
    background-color: #ffffff;
    border-color: #00000080;
}

#orders-table .grid-box .flat-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}


#orders-table .empty {
    padding: 10px;
    background-color: #e3e3e3;
}

#orders-table .integration-button {
    outline: none;
    color: darkblue;
    padding: 0 6px!important;
    margin-right: 10px;
    cursor: pointer;
    background: #f8f8f8;
    border: 1px solid #01010140;
}
#orders-table .integration-button.single {
    width: 70px;
    height: 22px;
    cursor: pointer;
    background: #f8f8f8;
    border: 1px solid #01010140;
}
#orders-table .integration-button:hover {
    color: #040438;
    background: #cfcfcf;
    border: 1px solid #01010140;
}
#orders-table .integration-button.disabled {
    width: 70px;
    height: 22px;
    cursor: default;
    background: none;
    border: none;
}
#orders-table .integrations-card {
    background-color: #e3e3e3;
    border: 2px solid #01010140;
    position: absolute;
    transform: translate(-6px, -3px);
}
#orders-table .integrations-card .title {
    margin: 0 0 10px 0;
    background-color: #f8f8f8;
    padding: 5px 10px;
}

.integration-button.big {
    font-size: 18pt;
    padding:0px 14px;
    border: 1px solid #01010140!important;
    cursor: pointer;
    margin: 0 0 0 20px!important;
}
.integration-button.big:hover {
    background: #f8f8f8!important;
}


#orders-table .grid-box .drop-button {
    display: none;
    position: absolute;
    color: darkred;
    font-size: 12pt;
    width: 30px;
    margin-left: auto;
    margin-right: 0;
    border: none;
    outline: none;
    cursor: pointer;
    background:none;
}
#orders-table .grid-box div:hover .drop-button {
    display: inline-block;
}


#orders-for-date {
    font-family: Times, 'Times New Roman', serif
}

#orders-for-date table {
    display: block;
    width: fit-content;
    margin: 0;
    border-collapse: collapse;
    padding: 0 10px;
}
#orders-for-date table .table-totals {
    background-color: #f8f8f8;
}

#orders-for-date table :is(tr) {
    border-bottom: 1px solid #01010140;
    height: 28px;
}
#orders-for-date table .table-totals tr {
    height: 34px;
}
#orders-for-date table :is(th) {
    text-align: left;
}
#orders-for-date table :is(th, td) {
    padding: 2px 10px;
}

#orders-for-date table input[type=number] {
    width: 60px;
    outline: none;
    text-align: center;
    -moz-appearance: textfield;
}
#orders-for-date table input[type=number]::-webkit-outer-spin-button,
#orders-for-date table input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}



/* book order */
#new-order-section {
    margin: 10px 0 ;
    padding: 0 10px;
    display: flex;
    width: 100%;
}
#new-order-section > .tilaus-button,
#new-order-section .apply {
     width: fit-content;
    /* font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; */
    padding: 0;
    font-size: 22pt;
    outline: none;
    border: none;
    background: none;

    transition: .2s ease;
    color: darkgreen;
    text-transform: uppercase; 
}

#new-order-section > .tilaus-button {
    order: -1;
    margin-right: 20px;
    font-size: 28pt;
}
#new-order-section .apply {
    margin-left: 20px;
}

#new-order-section > .tilaus-button:hover,
#new-order-section .apply:hover {
    color: #043e04;
}

#current-customer-card {
    display: flex;
    gap: 10px;
}

#current-customer-card .card-column {
    display: flex;
    flex-direction: column;
}

li.customer-card-row {
    margin-top: 20px;
}

li.customer-card-row table {
    border: none!important;
}

li.customer-card-row .delete-product {
    color: darkred;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
}
li.customer-card-row .delete-product:hover {
    color: #5c0000;
}

#finalize-order {
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
}
#finalize-order button {
    font-weight: bold;
    text-transform: uppercase;
    outline: none;
    cursor: pointer;
    border-radius: 3px;
    background-color: #d4d4d4;
}
#finalize-order button:hover {
    background-color: whitesmoke;
}

#sum-of-orders {
    margin: auto 0 0 0;
    padding: 10px 0;
}
#sum-of-orders :is(h1,h2,h3,h4,p,span) {
    font-family: 'Arial Narrow Bold', sans-serif;
    padding: 0 10px;
}
#final-sum {
    margin: auto 0 0 0;
    padding: 10px 0;
    display: flex;
    flex-wrap: wrap;
}

/* integrations container */
#integrations-container {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #00000030;
    justify-content: center;
    align-items: center;
}
#integrations-container .body {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    background-color: #eeeeee;
    padding-bottom: 10px;
    border: 2px solid #00000040;
}
#integrations-container .body .top {
    display: flex;
    width: 100%;
    justify-content: flex-end;
}
#integrations-container .body table {
    width: 100%; 
    padding: 10px;
}
#integrations-container .body table .i-row {
    height: 25px;
}
#integrations-container .body table .i-row > *{
    padding: 0 5px;
}

/* login */
#login-box {
    width: fit-content;
    padding: 10px;
    margin: 10px auto;
    border: 2px solid #00000042;
}
#login-box :is(h1,h2,h3,h4,h5) {
    margin: 0 0 18px 0;
    border-bottom: 1px solid #00000042;
}
/* log out */
#nav-username #log-out-box {
    position: absolute!important;
    background-color:#e7e7e7;
    display: none;
    gap: 10px;
    flex-direction: column;
    padding: 16px 12px;
    border: 1px solid #00000042;
    transform: translateY(-3px);
}
#nav-username #log-out-box .log-out-btn .link {
    text-decoration: none!important;
}
#nav-username #log-out-box .log-out-btn {
    color: darkred;
    text-decoration: none;
    cursor: pointer;
}
#nav-username #log-out-box .log-out-btn:hover {
    color: #5c0000;
    background-color: #2f2f2f15;
}
#nav-username:hover #log-out-box {
    display: flex;
}

.c {
    text-align: center!important
}
.l {
    text-align: left!important
}
.r {
    text-align: right!important
}
.b {
    font-weight: bold!important;
}
.fat {
    padding: 0 5px 0 0!important;
}

/* Error messages */

.error-msg-card {
    animation: errappear .3s forwards ease
}
@keyframes errappear {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
#confirmation-box {
    position:fixed;
    top:0;
    left:0;
    display:grid;
    place-items:center;
    width:100%;
    height:100vh;
    background:#ffffff99;
}
#confirmation-box .conf-card {
    display:flex;
    flex-direction:column;
    background:#e2e2e2;
    padding:0;
    border: 1px solid #00000066;
}
#confirmation-box .conf-card > p {
    background:#c2c2c2;
}
#confirmation-box .conf-btn {
    border: none;
    outline: none;
    cursor: pointer;
    background-color: #e2e2e2;
    padding: 10px 6px;
    width: 80px;
    background-color: #00000010;
}
#confirmation-box .conf-btn:hover {
    background-color: #00000025;
}
.order-status {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    column-gap: 10px;
}