﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}
/* 桌面樣
    式 */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    td.vertical-text {
        writing-mode: vertical-lr;
        text-align: center;
        vertical-align: middle;
        font-weight: bold;
        font-size: large;
    }

    .container{
        width: 75%;
    }

    /*工單用料專用*/
    #CDT {
        max-height: 900px; /* 設置表格容器的最大高度*/
        overflow-y: auto; /* 超過最大高度時出現垂直卷軸 */
        background-color: #fff;
        box-shadow: 5px 0px 10px hsla(240, 40%, 15%, .6);
    }

    .side-menu {
        position: relative;
        z-index: 1;
    }

    #side-menu-switch {
        position: absolute;
    }

    .side-menu #labelArrow {
        position: absolute;
        display: block; 
        width: 15px;
        height: 80px;
        background-color: #000;
        color: #fff;
        right: -15px;
        top: 0;
        bottom: 0;
        margin: auto;
        line-height: 80px;
        text-align: center;
        font-size: 15px;
        border-radius: 0 10px 10px 0;
    }
    /*工單用料專用*/
}

@media (max-width: 767px) {
    .container-fluid {
        width: 100%;
    }

    .table {
        width: 100%;
    }
    /* 手機樣式 */
    td.vertical-text {
        text-align: center;
        vertical-align: middle;
        font-weight: bold;
        font-size: large;
    }

    #rowCountShow {
        font-size: 20px; /* 依需求調整字體大小 */
    }

    /*語言選擇字體大小*/
    #lg {
        font-size: x-large;
        padding: 0px 10px;
    }

    label{
        font-size:large;
    }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0px;
}

/*旋轉動畫*/
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/*下拉選單子選單樣式*/
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -9px;
    margin-left: -1px;
    -webkit-border-radius: 0 6px 6px 0; /*用於 WebKit 瀏覽器（如 Chrome 和 Safari）的前綴詞*/
    -moz-border-radius: 0 6px 6px 0; /*用於 Mozilla Firefox 瀏覽器的前綴詞*/
    border-radius: 0 6px 6px 0;
    background-color: #343a40; /*设置子菜单背景色为灰色;*/
}

/* 子選單懸停時顯示 */
.dropdown-submenu:hover > .dropdown-menu {
    display: block;
}

/* 下拉箭頭樣式 */
.dropdown-submenu > a:after {
    display: block;
    content: " ";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #000;
    margin-top: 5px;
    margin-right: -10px;
}

/*=======以下為loaging畫面======*/
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: none; /* Initially hidden */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000; /* Make sure it's on top of other elements */
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-screen p {
    margin-top: 10px;
    font-size: 16px;
    color: #333;
}

/*=======以下為由下往上滑入動面======*/
@keyframes slideInFromBottom {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}
/*=======以下為由下往上滑入並滑出動面======*/
@keyframes slideInAndOut {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }

    25% {
        transform: translateY(0);
        opacity: 0.8;
    }

    50% {
        transform: translateY(0);
        opacity: 1;
    }

    75% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* 此為電腦螢幕時效果 畫面上移*/
@keyframes slideUpAnimationDesktop {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-10%);
    }
}

/* 此為手機螢幕時效果 畫面上移*/
@keyframes slideUpAnimationMobile {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-5%);
    }
}

/*電腦螢幕*/
@media only screen and (min-width: 601px) {
    .moveUp {
        animation-name: slideUpAnimationDesktop;
        animation-duration: 3s; 
    }
}

/*手機螢幕*/
@media only screen and (max-width: 600px) {
    .moveUp {
        animation-name: slideUpAnimationMobile;
        animation-duration: 3s;
    }
}

/*透明漸變效果*/
@keyframes opacityEffect {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

