/* 📌 ไฟล์: style.css */

/* กฎข้อ 19: ป้องกัน Mobile Pull-to-Refresh */
body {
    overscroll-behavior-y: none; 
    -webkit-overflow-scrolling: touch;
}

/* กฎข้อ 10: Auto-expand Textarea คุมความสูง */
textarea {
    min-height: 120px;
    max-height: 350px;
    overflow-y: auto;
}

/* ⏳ Global Loading Overlay (กฎข้อ 54) */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(17, 24, 39, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.loading-overlay.d-none {
    display: none !important;
}

/* CSS Spinner */
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar for Table */
.overflow-x-auto::-webkit-scrollbar {
    height: 8px;
}
.overflow-x-auto::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 4px;
}
.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 4px;
}
.overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}