﻿/* ครอบ GridView ให้อยู่กลางหน้า */
.gridview-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* GridView หลัก */
.gridview-centered {
    margin: 0 auto !important;
    background-color: #fff;
    border-collapse: collapse;
}

    .gridview-centered th,
    .gridview-centered td {
        padding: 10px 14px;
        text-align: center;
        vertical-align: middle;
    }

/* Header */
.gv-header th {
    background-color: #5bc0de;
    color: #fff;
    font-weight: 600;
    border: 1px solid #46b8da;
}

/* Pager */
.gv-pager {
    background-color: #f8f9fa;
}

    .gv-pager td {
        padding: 10px;
    }

    .gv-pager table {
        margin: 0 auto;
    }

    .gv-pager a,
    .gv-pager span {
        display: inline-block;
        padding: 6px 12px;
        margin: 0 3px;
        border: 1px solid #ddd;
        border-radius: 4px;
        color: #337ab7;
        text-decoration: none;
        min-width: 36px;
        text-align: center;
    }

        .gv-pager a:hover {
            background-color: #eee;
            color: #23527c;
            text-decoration: none;
        }

    /* หน้าปัจจุบัน */
    .gv-pager span {
        background-color: #337ab7;
        border-color: #337ab7;
        color: #fff;
        font-weight: 600;
    }

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.loading-content {
    background: white;
    padding: 35px 60px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    min-width: 300px;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    margin-top: 18px;
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.loading-subtext {
    margin-top: 6px;
    font-size: 13px;
    color: #888;
}

/* ปุ่มตอน disable */
.btn-loading {
    pointer-events: none !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}
