/* === Overlay Styles ===
   This styles the full-screen background overlay */
#pg-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
}

#pg-popup-overlay > #pg-popup-container {
    pointer-events: auto;
    width: 70%;
    max-width: 850px;
    height: auto;
    max-height: 65%;
    background: #ffffff;
    padding: 35px;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    position: relative;
}

#pg-popup-container {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;
}

#pg-popup-container h2 {
    font-family: 'articulat-heavy-cf', sans-serif;
    font-size: 42px;
    letter-spacing: 0;
    margin: 0 auto;
    padding: 0;
    display: inline-block;
    color: #9d182f;
    font-weight: 900;
}

#pg-popup-container p {
    font-family: 'articulat-cf-thin', sans-serif;
    font-size: 18px;
    margin-bottom: 15px;
    color: #666666;
}

#pg-popup-logo {
    display: block;
    max-width: 170px; /* Set the maximum width of the logo */
    height: auto; /* Maintain aspect ratio */
    margin-bottom: 20px;
}

.pg_save_main_outside {
    display: flex;
    flex-direction: row;
    height: 30px !important;
    width: auto;
}

.pg_save_settings_class {
    margin-right: 10px !important;
}

.pg_save_status_class {
    display: none;
    color: green !important;
    font-size: 14px;
    align-self: center;
}

/* === Popup Options Styles === */
#pg-popup-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px; /* Space between buttons */
    margin-bottom: 10px;
}

.pg-popup-option {
    background: #ffffff;
    color: #333333;
    border: 1px solid #333333;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, border-color 0.3s ease; /* 平滑过渡 */
}

.pg-popup-option:hover {
    background: #f5f5f5;
    transform: scale(1.05);
    border-color: #333333;
    box-shadow: none;
}

.pg-popup-option:focus {
    outline: none;
}


.pg-popup-option:focus {
    outline: 3px solid #ffb900; /* Yellow outline for focus accessibility */
}

/*==================Table styling=======================*/
.chart-filter-form-outside {
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.type-chart-container-outside {
    width: 100%;
    height: 500px;
    margin-bottom: 40px;
}

.data-range-select {
    width: 220px !important;
    height: 36px !important;
    padding: 0 5px !important;
    line-height: 36px !important;
    font-size: 14px !important;
    margin-right: 10px !important;
}

.data-range-select option {
    padding: 0 5px;
    height: 36px;
    line-height: 36px;
}

.apply-chart-filter-btn {
    width: 80px !important;
    height: 35px !important;
    margin-right: 10px !important;
}

.apply-chart-export-csv-btn {
    width: 120px !important;
    height: 35px !important;
}

.list_filter_form_outside {
    margin-bottom: -40px;
    display: flex;
    align-items: center;
}

.search_main_input {
    width: 400px;
    height: 36px;
    margin-right: 10px;
    padding: 5px 40px 5px 5px;
}

.pg_search_btn_outside {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.clear-btn-search {
    display: none;
    border: none;
    background: transparent;
    cursor: pointer;
    margin-right: 3px;
}

.clear-btn-search i {
    color: grey;
    font-size: 13px;
}

.search_input_outside_div {
    position: relative;
}

.type_filter_main_select {
    width: 275px !important;
    height: 36px !important;
    padding: 0 5px !important;
    line-height: 36px !important;
    font-size: 14px !important;
    margin-right: 10px !important;
}

.type_filter_main_select option {
    padding: 0 5px;
    height: 36px;
    line-height: 36px;
}

.apply_list_filter_btn {
    width: 80px !important;
    height: 35px !important;
}

.pg-tool-table-outside {
    margin-top: 0;
}

.table_p_loading {
    margin-top: 50px;
}

.wp-list-table th.column-id, .wp-list-table td.column-id {
    width: 150px;
}

#pg-popup-footer-image-container {
    text-align: center;
    margin-top: 10px;
}

#pg-logo-footer-image {
    max-width: 100%;
    height: auto;
    max-height: 100px;
}


@media (max-width: 1080px) {
    #pg-popup-container {
        width: 100%; /* Adjust popup width for tablets */
    }

    #pg-popup-logo {
        margin-bottom: 20px;
        max-width: 160px; /* Set the maximum width of the logo */
    }

    .pg-popup-option {
        padding: 12px 16px;
        font-size: 12px;
    }

    #pg-popup-container h2 {
        font-size: 32px;
        letter-spacing: 10px;
        margin-bottom: 12px;
    }

    #pg-popup-container p {
        font-size: 14px;
        margin-bottom: 15px;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    #pg-popup-container {
        width: 90%; /* Adjust popup width for tablets */
    }

    #pg-popup-logo {
        margin-bottom: 10px;
        max-width: 110px; /* Set the maximum width of the logo */
    }

    .pg-popup-option {
        padding: 8px 12px;
        font-size: 10px;
    }

    #pg-popup-container h2 {
        font-size: 25px;
        letter-spacing: 3px;
        margin-bottom: 8px;
    }

    #pg-popup-container p {
        font-size: 12px;
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    #pg-popup-overlay > #pg-popup-container {
        width: 85%;
        height: 60%;
        padding: 15px;
    }

    #pg-popup-logo {
        margin-bottom: 5px;
        max-width: 100px; /* Set the maximum width of the logo */
    }

    #pg-popup-container {
        width: 90%; /* Adjust popup width for tablets */
    }

    .pg-popup-option {
        padding: 8px 12px;
        font-size: 10px;
    }

    #pg-popup-container h2 {
        font-size: 20px;
        letter-spacing: 5px;
        margin-bottom: 5px;
    }

    #pg-popup-container p {
        font-size: 12px;
        margin-bottom: 5px;
    }
}

/* loading CSS */
#pg_loading-overlay {
    position: fixed;
    width: 120px; /* Fixed size */
    height: 120px; /* Fixed size */
    top: 50%;
    left: 50%;
    background: rgba(0, 0, 0, 0.8); /* Black with 80% opacity */
    z-index: 9999;
    display: none;
    pointer-events: all; /* Ensure the overlay captures all interactions */
    transform: translate(-50%, -50%); /* Center the overlay */
    border-radius: 15px; /* Rounded corners */
}

.pg_loader-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.pg_loader {
    border: 8px solid #f3f3f3; /* Reduced size */
    border-radius: 50%;
    border-top: 8px solid #3498db; /* Reduced size */
    width: 40px; /* Reduced size */
    height: 40px; /* Reduced size */
    animation: spin 2s linear infinite;
}
