@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

@page {
    size: A4;
}

body {
    font-family: 'TH SarabunIT', sans-serif;
    font-size: 16pt;
}

#thsarabunnew {
    font-family: 'TH Sarabun New', sans-serif;
    font-size: 16pt;
}

@media print {
    #printPageButton {
        display: none;
    }
    button {
        display: none;
    }
}

button {
    font-family: 'Sarabun', sans-serif;
    position: fixed; /* Changed from absolute to fixed */
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    padding: 12px;
    font-size: 20pt;
    font-weight: bold;
    cursor: pointer;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    transition: all 0.3s ease;
    z-index: 1000; /* Add z-index to ensure buttons appear above other content */
}

button:hover {
    background: transparent;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    color: #ffffff;
}

button:active {
    background: transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(1px);
}

/* สไตล์ปุ่มปริ้นที่แตกต่าง */
#printPageButton {
    font-family: 'Sarabun', sans-serif;
    background: transparent;
    color: #252525;
    padding: 12px;
    font-size: 24pt;
    cursor: pointer;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: fixed; /* Changed from absolute to fixed */
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1000;
}

#printPageButton i {
    font-size: 36px; /* Increased icon size */
}

#printPageButton:hover {
    background: transparent;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#printPageButton:active {
    background: transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* สไตล์ปุ่ม Home */
#homeButton {
    font-family: 'Sarabun', sans-serif;
    background: transparent;
    color: #1275c5;
    padding: 12px;
    font-size: 15pt;
    cursor: pointer;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: fixed; /* Changed from absolute to fixed */
    top: 5.5rem;
    right: 0.5rem; /* Added explicit right position */
    z-index: 1000;
}

#homeButton i {
    font-size: 36px; /* Increased icon size */
}

#homeButton:hover {
    background: transparent;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#homeButton:active {
    background: transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}