* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'MyCustomFont';
    src: url('webfont/chulabhornlikittext-medium.woff2') format('woff2'),
         url('webfont/chulabhornlikittext-medium.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'MyCustomFont', sans-serif;
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background-image: url('your-image.jpg'); /* ใส่ URL หรือ Path ภาพที่นี่ */
    background-size: cover; /* ปรับภาพให้เต็มพื้นที่ */
    background-position: center; /* จัดภาพให้อยู่ตรงกลาง */
    background-repeat: no-repeat; /* ไม่ให้ภาพซ้ำ */
}

.menu {
    background-color: #0DA614;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
}

.menu .menu-items {
    display: flex;
    gap: 0.1px;
    height: 100%;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center; /* จัดไอคอนและข้อความให้กึ่งกลาง */
    margin: 0 15px;
    font-size: 16px;
}

.menu .menu-items a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    height: 100%;
}

.menu-items a img,
.menu-items a svg {
    margin-right: 8px; /* ระยะห่างไอคอนและข้อความ */
    width: 20px;
    height: 20px;
    fill: rgb(255, 255, 255); /* เปลี่ยนสีของ SVG */
    transition: fill 0.3s ease; /* เพิ่ม Transition */
}

/* สีการจิ้มเมนูแถบ */
.menu .menu-items a:hover {
    color: #0ce8f0;
    background-color: rgba(255, 255, 255, 0);
}

.menu .menu-items .dropdown {
    position: relative;
    height: 100%;
}

/* สีเมนูย่อย */
.menu .menu-items .dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #212529;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    width: 205px;
    padding-top: 5px;
}

.menu .menu-items .dropdown:hover .dropdown-content {
    display: block;
}

.menu .menu-items .dropdown-content a {
    display: block;
    padding: 10px 20px;
    color: rgb(255, 255, 255);
    text-decoration: none;
}

/* สีการจิ้มเมนูย่อย */
.menu .menu-items .dropdown-content a:hover {
    background-color: rgba(0, 0, 0, 0);
    color: rgb(0, 255, 255);
}

.menu .right-items {
    display: flex;
    gap: 15px;
    align-items: center;
    height: 100%;
}

.menu .right-items button {
    background-color: red;
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 3px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ปุ่มติดตั้งแอป*/
.menu .right-items .install-button {
    background-color: rgb(255, 0, 0);
    color: white;
    padding: 0 15px;
    border: none;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu .right-items .install-button:hover {
    background-color: rgb(175, 17, 17);
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden; /* ป้องกันการเลื่อนหน้าจอ */
}

.content {
    height: calc(100vh - 50px); /* คำนวณพื้นที่ที่เหลือจากความสูงของเมนู */
    margin: 0;
    padding: 0;
}

.iframe-container {
    width: 100%;
    height: 100%;
}

.iframe-container iframe {
    width: 100%;
    height: 100%; /* ขยาย iframe ให้เต็มพื้นที่ */
    border: none;
}

@media print {
    .menu {
        background-color: #af4c4c !important;
        color: white !important;
    }
}

.print-button {
    background-color: #2196F3; /* สีฟ้า */
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 3px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.print-button:hover {
    background-color: #0b7dda; /* สีฟ้าเข้มเมื่อ Hover */
}

@media print {
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-size: 12px; /* ลดขนาดฟอนต์ */
        margin: 0;
        padding: 0;
    }

    * {
        overflow: visible !important;
        visibility: visible;
    }

    .menu, .content {
        transform: scale(0.85); /* ย่อขนาดทั้งหน้าให้พอดีกระดาษ */
        transform-origin: top left;
    }
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    background-image: url('BG_popup.png'); /* ใส่ภาพพื้นหลัง */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: red;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: darkred;
}

/*12/1*/
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* สีพื้นหลังแบบโปร่ง */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 5px;
    width: 90%; /* ปรับขนาดความกว้างของป็อปอัพ */
    max-width: 90%; /* จำกัดความกว้างสูงสุด */
    height: 90%; /* ปรับความสูงให้เต็มพื้นที่ */
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Overlay ปิดหน้าจอ กันคลิกขณะโหลด */
.loading-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;               /* ซ่อนด้วย inline style ก่อน */
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  /* ตัว Spinner */
  .spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;  /* ไม่กำหนดสีอื่นๆ ก็พอ */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  

  
  @keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }