﻿/*.modal-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
    overflow-y: auto;
    padding: 20px;
}*/
/* ===== GLOBAL FONT ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    overflow-x: hidden;
}
/* ลบ style พื้นฐาน browser */

html, body {
    font-family: "Sarabun", sans-serif !important;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.2px;
}

/* form controls */
input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* label */
label {
    font-family: inherit;
    font-weight: 500;
}

/* smooth font (มือถือเห็นผลชัด) */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/*===========================================*/


/* ซ่อน radio เดิม */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #CFA459; /* 🔥 สี border */
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

    /* ตอนเลือก */
    input[type="radio"]:checked {
        background-color: #CFA459;
        border-color: #CFA459;
    }

        /* จุดตรงกลาง */
        input[type="radio"]:checked::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 50%;
            width: 8px;
            height: 8px;
            background: white;
            border-radius: 50%;
            transform: translate(-50%, -50%);
        }

.search-container {
    max-width: 700px;
    box-shadow: 0 5px 15px rgba(0,0,0,.3);
    position: relative;
    background-color: #f8f9fa; /* พื้นหลังสีเทาอ่อน */
    padding: 20px;
    border-radius: 8px;
}


/* ปุ่มปิดมุมบนขวา */
.btn-close.position-absolute {
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    opacity: 0.7;
    transition: opacity 0.2s ease-in-out;
}

    .btn-close.position-absolute:hover {
        opacity: 1;
    }

/* GridView Pagination */
table.table tbody tr td {
    vertical-align: middle;
}

/* สไตล์ปุ่มเล็กใน GridView */
.table .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.table thead th {
    font-weight: 600;
    background-color: #f8f9fa;
}
/*====================================================*/
/* สไตล์พื้นฐาน */
.dropdown-custom {
    display: inline-block;
    width: 100%; /* กว้างเต็มพื้นที่ parent เพื่อให้ responsive */
    max-width: 100%; /* ไม่จำกัดความกว้างสูงสุด */
    height: 36px;
    padding: 6px 12px;
    font-size: 14px;
    color: #333;
    background-color: #ffffff; /* พื้นหลังขาว */
    border: 1px solid #CFA459;
    border-radius: 5px; /* ขอบมน */
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    /*appearance: none;*/
    box-sizing: border-box; /* ให้ padding ไม่บวกเพิ่มความกว้าง */
    font-family: inherit; /* ใช้ font เดียวกับ element รอบๆ */
}

    /* hover / focus */
    .dropdown-custom:hover,
    .dropdown-custom:focus {
        background-color: #CFA459;
        border-color: #CFA459;
        box-shadow: 0 0 6px rgba(207, 164, 89, 0.5);
        outline: none;
    }

    /* disabled */
    .dropdown-custom[disabled] {
        background-color: #eee;
        color: #999;
        cursor: not-allowed;
    }

    /* ตัวเลือกใน dropdown list */
    .dropdown-custom option {
        background-color: #ffffff; /* list สีขาว */
        color: #333;
    }

        /* ตัวเลือกที่ถูกเลือก */
        .dropdown-custom option:checked {
            background-color: #CFA459;
        }

/* Responsive: ลดขนาดฟอนต์ และความสูง dropdown บนมือถือ */
@media (max-width: 480px) {
    .dropdown-custom {
        font-size: 13px;
        height: 32px;
        padding: 5px 10px;
    }
}

/*====================================================*/
.auto-width {
    width: auto;
    min-width: 50px; /* ป้องกันเล็กเกิน */
    padding: 4px 6px;
}

.auto-resize {
    min-width: 80px;
    max-width: 100%;
    padding: 6px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

input[disabled] {
    background-color: #f5f5f5; /* สีพื้นหลังอ่อน */
    color: #999;
    border: 1px solid #CFA459 !important; /* ขอบชัดๆ สีทอง */
    border-radius: 4px;
    opacity: 1 !important; /* บาง browser ทำให้จาง ต้อง override */
    box-shadow: none;
}

.grid-icon {
    font-size: 16px; /* หรือ 14px ตามต้องการ */
    vertical-align: middle;
}

.table-mobile {
    width: 100%;
    font-size: 12px;
}

.table-desktop {
    width: 100%;
    font-size: 14px;
}
/*=============================*/
.custom-dropdown {
    position: relative;
    width: 320px;
    font-size: 14px;
    user-select: none;
}

.custom-dropdown-select {
    background: white;
    border: 1px solid #CFA459;
    border-radius: 999px;
    padding: 8px 16px;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    transition: border-color 0.3s, box-shadow 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .custom-dropdown-select:hover,
    .custom-dropdown-select.open {
        border-color: #CFA459;
        box-shadow: 0 0 10px rgba(207, 164, 89, 0.5);
    }

    .custom-dropdown-select span {
        flex-grow: 1;
    }

.custom-dropdown-arrow {
    border: solid #CFA459;
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 4px;
    margin-left: 8px;
    transform: rotate(45deg);
    transition: transform 0.3s;
}

.custom-dropdown-select.open .custom-dropdown-arrow {
    transform: rotate(-135deg);
}

.custom-dropdown-list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #CFA459;
    border-radius: 8px;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 10;
    display: none;
}

    .custom-dropdown-list.open {
        display: block;
    }

.custom-dropdown-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

    .custom-dropdown-option:hover,
    .custom-dropdown-option.selected {
        background-color: #CFA459;
        color: #5a3e00;
    }
/* Scrollbar แบบหรู */
.custom-dropdown-list::-webkit-scrollbar {
    width: 8px;
}

.custom-dropdown-list::-webkit-scrollbar-thumb {
    background-color: #CFA459;
    border-radius: 4px;
}
/* รองรับมือถือ */
@media (max-width: 400px) {
    .custom-dropdown {
        width: 100%;
    }
}

.btn-custom {
    background-color: #CFA459;
    border-color: #CFA459;
    color: #fff;
}

    .btn-custom:hover {
        background-color: #b88f45; /* สีเข้มขึ้นตอน hover */
        border-color: #b88f45;
        color: #fff;
    }



/* --------------------------------------------*/
.booking-container {
    /*font-family: 'Segoe UI', 'Prompt', sans-serif;*/
    font-family: inherit;
}

.form-row {
    margin-bottom: 2px;
}

.terms-card {
    border: 1px solid #e0e0e0;
    background: #fafafa;
    padding: 16px 18px;
    border-radius: 8px;
}

.terms-title {
    font-weight: 600;
    font-size: 16px;
    text-decoration: underline;
    margin-bottom: 10px;
    display: block;
}

.terms-list {
    padding-left: 20px;
    margin: 8px 0;
}

    .terms-list li {
        margin-bottom: 6px;
    }

.terms-warning {
    background: #fff4f4;
    border-left: 4px solid #ff4d4f;
    padding: 10px 12px;
    font-size: 14px;
    margin-top: 12px;
    border-radius: 4px;
}

.accept-box {
    margin-top: 14px;
    font-size: 14px;
}

.terms-header {
    list-style-type: none; /* ไม่แสดง bullet ถ้าไม่ต้องการ */
    margin-left: 0;
}

    .terms-header strong {
        font-size: 1.2rem;
        color: #000;
    }

.sub-list {
    padding-left: 35px;
}
/*========================================*/
.service-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.service-label {
    width: 180px; /* ชิดซ้ายเท่ากับ label อื่น */
    font-weight: 600;
    padding-top: 6px;
}

.service-list {
    flex: 1;
}

.service-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.person-label {
    /* "คนที่ X :" ตรงกันทุกบรรทัด */
    width: 80px;
    text-align: right;
    margin-right: 8px;
}

.service-ddl {
    min-width: 220px;
}

.service-price {
    flex: 0 0 auto !important;
    width: 80px !important;
    min-width: 80px !important;
    height: 36px;
    padding: 6px 10px;
    text-align: right;
    font-weight: 500;
    color: #8B6A2E;
    background-color: #f9f6ef;
    border: 1px solid #CFA459;
    border-radius: 5px;
    box-sizing: border-box;
    margin-left: 12px;
}


    /* readonly look */
    .service-price[readonly] {
        cursor: default;
    }

/*.service-item:nth-child(even) {
    background: #f8f8f8;
    padding: 4px;
    border-radius: 4px;
}*/
.mobile-group {
    display: flex;
    gap: 8px;
}

    .mobile-group select {
        flex: 0 0 140px;
        min-width: 120px;
    }

    .mobile-group input {
        flex: 1;
    }
/* ===== SweetAlert Custom ===== */
.custom-swal-html {
    font-size: 16px;
    font-family: 'Sarabun', sans-serif;
    text-align: center;
    line-height: 1.6;
}

.swal2-popup {
    font-family: 'Sarabun', sans-serif;
    border-radius: 10px;
}

.swal2-confirm {
    font-size: 14px;
    padding: 8px 18px;
}



.radio-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
}

    .radio-group label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: 400 !important;
    }

.input-with-icon {
    display: flex;
    align-items: center;
    gap: 6px;
}

    /* textbox เต็มพื้นที่ */
    .input-with-icon .form-control {
        flex: 1;
    }

/* ปุ่ม icon */
.input-icon-btn {
    width: 36px;
    height: 36px;
    padding: 4px;
    border: 1px solid #CFA459;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    transition: 0.2s;
}

    /* hover */
    .input-icon-btn:hover {
        background-color: #CFA459;
    }

/*==========Mobile=================================*/


@media (max-width: 768px) {
    body {
        background-attachment: scroll !important;
    }
    .container,
    .body-content {
        max-width: 100% !important;
        width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    .service-item {
        display: flex !important;
        flex-direction: column !important; /* 🔥 สำคัญ */
        align-items: stretch !important;
    }

    .person-label {
        width: 100% !important;
        text-align: left !important;
    }

    .service-ddl {
        width: 100% !important;
    }

    .service-price {
        width: 100% !important;
        text-align: right;
        margin-left: 0px !important;
    }

    .booking-container {
        padding: 10px;
    }

    .form-row,
    .form-row-customer {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

        .form-row label,
        .form-row-customer label {
            width: 100%;
            font-size: 14px;
            font-weight: 600;
        }

    .form-control,
    .dropdown-custom {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ปุ่ม maps ลงบรรทัด */
    .form-row .btn {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 6px;
    }

    .person-label {
        width: auto;
        text-align: left;
        font-weight: bold;
    }

    .service-ddl {
        width: 100% !important;
    }

    .service-price {
        width: 100% !important;
        text-align: right;
    }

    .submit-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

        .submit-row .btn {
            width: 100%;
            font-size: 16px;
            padding: 10px;
        }

    .mobile-group {
        flex-direction: column;
    }

        .mobile-group select,
        .mobile-group input {
            width: 100%;
        }

    .custom-swal-html {
        font-size: 14px;
    }

    .swal2-popup {
        width: 90% !important;
    }

    .radio-group {
        display: flex;
        flex-direction: column; /* เรียงลง */
        align-items: flex-start; /*ชิดซ้ายทั้งหมด */
        gap: 10px;
        
    }

        /* ===== ASP.NET span wrapper ===== */
        .radio-group span {
            display: flex;
            align-items: center;
            width: 100%;
            font-weight: 400 !important;
            margin-left: 0px !important;
        }

        /* ===== radio + text ===== */
        .radio-group input[type="radio"] {
            margin-right: 8px; /* ระยะห่างวงกลมกับ text */
        }

        /* label/text */
        .radio-group label {
            margin: 0;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

  
}

    @media screen and (max-width: 900px) and (orientation: landscape) {
        body {
            background-attachment: scroll !important;
        }
        .paper {
            padding: 120px 80px 100px;
            overflow-x: hidden;
        }
    }




    @media (max-width: 480px) {
        .custom-swal-html {
            font-size: 13px;
        }

        .swal2-popup {
            width: 95% !important;
        }

        .swal2-confirm {
            width: 100%;
            font-size: 16px;
            padding: 12px;
        }
    }



    /*===========================================*/
