/*
 Theme Name: Astra Child
 Theme URI: http://example.com/astra-child
 Description: Astra Child Theme
 Author: Your Name
 Author URI: http://example.com
 Template: astra
 Version: 1.0.0
 Text Domain: astra-child
*/

/* =========================================
   TABLE DESIGN - MOBILE HORIZONTAL SCROLL
========================================= */

/* เฉพาะหน้าจอโทรศัพท์ */
@media (max-width: 767px) {

    /* กล่องครอบตาราง */
    .tabledesign .eael-data-table-wrap {
        width: 100% !important;
        max-width: 100% !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;

        -webkit-overflow-scrolling: touch;

        display: block !important;
    }

    /* ตัวตาราง */
    .tabledesign .eael-data-table {
        width: max-content !important;
        min-width: 650px !important;

        table-layout: auto !important;

        border-collapse: collapse !important;
    }

    /* กำหนดความกว้างของแต่ละคอลัมน์ */
    .tabledesign .eael-data-table th,
    .tabledesign .eael-data-table td {
        min-width: 200px !important;
        white-space: normal !important;

        padding: 16px 20px !important;

        vertical-align: middle !important;
    }

    /* คอลัมน์แรก */
    .tabledesign .eael-data-table th:first-child,
    .tabledesign .eael-data-table td:first-child {
        min-width: 170px !important;
    }

    /* ข้อความในเซลล์ */
    .tabledesign .td-content {
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
    }

    /* ป้องกัน Widget หรือ Elementor ตัดการ Scroll */
    .tabledesign,
    .tabledesign .elementor-widget-container {
        max-width: 100% !important;
        min-width: 0 !important;
    }
    /* หัวตารางและข้อมูลทุกช่องชิดซ้าย */
    .tabledesign .eael-data-table th,
    .tabledesign .eael-data-table td {
        text-align: left !important;
    }

    /* จัดข้อความภายในเซลล์ให้ชิดซ้าย */
    .tabledesign .td-content-wrapper,
    .tabledesign .td-content {
        text-align: left !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }

    /* หัวตารางชิดซ้าย */
    .tabledesign .data-table-header-text {
        display: block !important;
        text-align: left !important;
    }
}


/* ---------------Product Download---------------- */
/* Product Download */
.woocommerce-Tabs-panel--wcpoa_product_tab .wcpoa_attachment {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin: 0 0 20px !important;
    padding: 0 !important;
}

/* ชื่อไฟล์ */
.woocommerce-Tabs-panel--wcpoa_product_tab .wcpoa_attachment_name {
    margin: 0 !important;

    color: #014A8C !important;

    font-size: 22px !important;
    font-weight: 600 !important;
    line-height: 1.4;
}

/* ปุ่ม Download */
.woocommerce-Tabs-panel--wcpoa_product_tab .wcpoa_attachmentbtn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    min-width: 150px;
    min-height: 48px;

    margin: 0 !important;
    padding: 10px 24px !important;

    background: #014A8C !important;
    border: 1px solid #014A8C !important;
    border-radius: 2px;

    color: #FFFFFF !important;

    font-size: 16px !important;
    font-weight: 500 !important;

    line-height: 1.2;

    text-decoration: none !important;

    transition: all 0.2s ease;
}

/* Hover */
.woocommerce-Tabs-panel--wcpoa_product_tab .wcpoa_attachmentbtn:hover {
    background: #014A8C !important;
    border-color: #014A8C !important;

    color: #FFFFFF !important;

    transform: translateY(-1px);
}

/* ระยะห่างระหว่างรายการ */
.woocommerce-Tabs-panel--wcpoa_product_tab .wcpoa_attachment + .wcpoa_attachment {
    padding-top: 4px !important;
}


/* Mobile */
@media (max-width: 767px) {

    .woocommerce-Tabs-panel--wcpoa_product_tab .wcpoa_attachment {
        gap: 16px;
        margin-bottom: 16px !important;
    }

    .woocommerce-Tabs-panel--wcpoa_product_tab .wcpoa_attachment_name {
        font-size: 17px !important;
    }

    .woocommerce-Tabs-panel--wcpoa_product_tab .wcpoa_attachmentbtn {
        min-width: 110px;
        min-height: 44px;

        padding: 9px 16px !important;

        font-size: 14px !important;
    }

}