button.our-service-order-button{
    height: auto !important;
}

.our-service-order-button {
    background-color: #4CAF50; /* Green */
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 5px;
}

.our-service-order-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.our-service-order-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    width: 80%;
    max-width: 500px;
}

.our-service-order-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.order-info {
    display: flex;
    flex-direction: column; /* จัดเรียงเป็นคอลัมน์ */
    align-items: flex-start; /* ชิดซ้าย */
}

.order-info p {
    margin: 5px 0;
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.order-info .label {
    font-weight: bold;
    margin-right: 10px;
}

.order-info .currency-symbol {
    margin-left: 5px;
}

/* Add CSS for .total-price */
.total-price {
    font-weight: bold; /* Make the total price bold */
    font-size: 18px; /* Adjust the font size */
    color: #007bff; /* Set a color */
}



/* --- Tabbed Payment Options Styling --- */

.payment-tabs-container {
    margin-top: 20px;
    border-top: 1px solid #eee; /* Optional separator */
    padding-top: 15px;
}

.payment-methods-title {
    font-size: 1em; /* Adjust size as needed */
    font-weight: bold;
    margin-bottom: 10px;
    text-align: left;
}

ul.payment-tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 0px 0; /* Remove bottom margin */
    display: flex;
    border-bottom: 2px solid #ccc; /* Line below tabs */
}

ul.payment-tabs li[role="presentation"] {
    margin: 0;
    padding: 0;
}

ul.payment-tabs button[role="tab"] {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px -2px 0; /* Negative margin pulls border up */
    border: 1px solid transparent;
    border-bottom: none; /* Remove bottom border initially */
    background-color: #f0f0f0;
    color: #555;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px 5px 0 0; /* Rounded top corners */
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    appearance: none; /* Remove default button styles */
    font-size: 0.95em;
}

/* Style for Hover state */
ul.payment-tabs button[role="tab"]:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* Style for Active/Selected Tab */
ul.payment-tabs button[role="tab"][aria-selected="true"],
ul.payment-tabs button[role="tab"].active {
    background-color: #fff;
    color: #007bff;
    border-color: #ccc #ccc transparent #ccc; /* Border matching the bottom line */
    border-bottom: 2px solid #fff; /* White border to cover the main bottom line */
    position: relative; /* Needed for the white border trick */
    z-index: 1; /* Bring active tab border above the main line */
}

/* Focus style for accessibility */
ul.payment-tabs button[role="tab"]:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    z-index: 2; /* Ensure focus is visible */
}


.payment-tab-content {
    padding: 20px 0px; /* Add padding above/below content */
    /* border: 1px solid #ccc; /* Optional: border around content */
    /* border-top: none; */
    /* background-color: #fff; */ /* Optional background */
    min-height: 200px; /* Ensure minimum height */
    display: flex; /* Use flex to center content */
    justify-content: center; /* Center QR horizontally */
    align-items: center; /* Center QR vertically */
}

.payment-pane {
    display: none; /* Hide panes by default */
    width: 100%; /* Take full width */
    text-align: center; /* Center content */
}

/* Show the active pane */
.payment-pane.active,
.payment-pane:not([hidden]) { /* Use :not([hidden]) for better compatibility */
     display: block; /* Or flex/grid if needed */
}


/* Style for the QR code image inside the pane */
.payment-pane .payment-image-label img {
    max-width: 280px; /* Increase size slightly for tabs */
    max-height: 280px;
    height: auto;
    border: none; /* Remove border if not needed */
    border-radius: 5px;
    display: inline-block; /* Allow centering with text-align */
    margin: 0 auto; /* Center if block */
}

/* Hide the actual radio button visually but keep it accessible */
.payment-pane input[type="radio"].payment-method-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
    margin: -1px;
    border: 0;
    padding: 0;
    white-space: nowrap;
    clip-path: inset(100%);
    clip: rect(0 0 0 0);
    overflow: hidden;
}


/* Ensure error message is below tabs/content */
.payment-tabs-container .payment-method-error {
    margin-top: 15px;
    padding: 0 10px; /* Add some padding */
}


/* Responsive adjustments for Tabs */
@media (max-width: 480px) {
    
    ul.payment-tabs button[role="tab"] {
        padding: 8px 10px; /* Smaller padding */
        font-size: 0.9em; /* Smaller font */
        flex-grow: 1; /* Allow tabs to fill space */
        text-align: center;
        margin-right: 2px;
        margin-left: 2px;
    }
     .payment-tab-content {
        padding: 15px 0px;
    }
     .payment-pane .payment-image-label img {
        max-width: 220px; /* Smaller QR on mobile */
        max-height: 220px;
    }
}

/* --- End Tabbed Payment Options Styling --- */



/* === Media Query for VERY Small Screens (Optional) === */
@media (max-width: 400px) {
    
    .our-service-order-popup-content .payment-image-option img {
         max-width: 180px; /* Make QR codes even smaller on very narrow screens */
         max-height: 180px;
    }
     .our-service-order-popup-content h2 {
        font-size: 1.2em; /* Reduce heading size slightly */
     }
     /* Adjust other font sizes if needed */
}

/* --- End Payment Options Popup Styling --- */



/* Form container */




/* --- Confirmation Form Styling Improvements --- */

/* Apply to the form container */
form._service_confirm {
    max-width: 700px; /* Optional: Limit max width on larger screens */
    margin: 20px auto; /* Center form and add top/bottom margin */
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff; /* Optional: background color */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Optional: subtle shadow */
    display: block; /* Override potential grid/flex from base styles */
}

/* Style Fieldsets for better structure */
form._service_confirm fieldset {
    border: none; /* Remove default border */
    padding: 0; /* Reset padding */
    margin: 0 0 25px 0; /* Add bottom margin to separate sections */
    border-bottom: 1px solid #eee; /* Optional separator line */
    padding-bottom: 20px; /* Space before the separator */
}
form._service_confirm fieldset:last-of-type {
     margin-bottom: 0; /* No margin for the last fieldset */
     border-bottom: none; /* No separator for the last fieldset */
     padding-bottom: 0;
}

form._service_confirm fieldset legend {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    padding: 0;
    width: 100%; /* Ensure legend takes full width */
    border-bottom: none; /* Remove default legend border if any */
}

/* Styling for each form row (paragraph) */
form._service_confirm p {
    margin-bottom: 18px; /* Consistent spacing between fields */
}

/* Style Labels */
form._service_confirm label {
    display: block; /* Ensure label is on its own line */
    font-weight: bold;
    color: #444;
    margin-bottom: 6px; /* Space between label and input */
    font-size: 0.95em;
}

/* Style Required marker */
form._service_confirm label .required {
    color: #d63638; /* Red color for asterisk */
    font-weight: normal; /* Make asterisk less bold */
    margin-left: 3px;
}

/* General Input and Textarea styling */
form._service_confirm input[type="text"],
form._service_confirm input[type="email"],
form._service_confirm input[type="tel"],
form._service_confirm input[type="number"],
form._service_confirm input[type="file"],
form._service_confirm textarea {
    width: 100%;
    padding: 10px 12px; /* Adjust padding */
    border: 1px solid #ccc; /* Slightly darker border */
    border-radius: 4px;
    font-size: 1rem; /* Use rem for better accessibility scaling */
    color: #333;
    background-color: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* Focus style for inputs */
form._service_confirm input[type="text"]:focus,
form._service_confirm input[type="email"]:focus,
form._service_confirm input[type="tel"]:focus,
form._service_confirm input[type="number"]:focus,
form._service_confirm input[type="file"]:focus,
form._service_confirm textarea:focus {
    border-color: #007bff; /* Highlight color on focus */
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25); /* Subtle glow */
    outline: none; /* Remove default browser outline */
}

/* Style Readonly inputs */
form._service_confirm input[readonly] {
    background-color: #f0f0f0; /* Grey background */
    color: #555;
    cursor: not-allowed;
    border-color: #e0e0e0;
}
form._service_confirm input[readonly]:focus {
     box-shadow: none; /* Remove focus glow for readonly */
     border-color: #e0e0e0;
}


/* Textarea specific */
form._service_confirm textarea {
    min-height: 100px;
    resize: vertical;
}

/* File input specific */
form._service_confirm input[type="file"] {
    padding: 8px 10px; /* Adjust padding for file input */
    background-color: #f9f9f9; /* Slightly different background */
}
/* Hint text below inputs */
form._service_confirm small.description,
form._service_confirm #wallet-format-hint, /* Target specific hint IDs */
form._service_confirm #file-upload-hint {
    display: block;
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
}

/* Progress Bar and Preview Area */
form._service_confirm .progress {
    margin-top: 10px;
    margin-bottom: 15px; /* Add space below progress */
    height: 22px; /* Slightly taller */
}
form._service_confirm .progress-bar {
    font-size: 0.8em;
    line-height: 22px; /* Center text vertically */
}
form._service_confirm #preview-container {
    margin-top: 10px;
    margin-bottom: 15px; /* Add space below preview */
    text-align: left; /* Align preview left */
}
form._service_confirm #preview-image {
    max-width: 150px; /* Adjust preview size */
    max-height: 150px;
    border: 1px solid #ddd;
    padding: 3px;
    background-color: #fff;
}

/* Error message styling */
form._service_confirm .error-message {
    color: #d63638; /* Red error color */
    font-size: 0.9em;
    margin-top: 5px;
    display: block; /* Ensure it's on its own line */
    font-weight: bold;
}
form._service_confirm .is-invalid {
    border-color: #d63638 !important; /* Make error border more prominent */
}


/* Submit Button */
form._service_confirm input[type="submit"] {
    width: 100%; /* Full width button on mobile */
    padding: 12px 20px;
    font-size: 1.1em;
    font-weight: bold;
    background-color: #4CAF50; /* Keep original green */
    border-color: #4CAF50;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    margin-top: 15px; /* Space above button */
}

form._service_confirm input[type="submit"]:hover,
form._service_confirm input[type="submit"]:focus {
    background-color: #3e8e41;
    border-color: #3e8e41;
    outline: none;
}
form._service_confirm input[type="submit"]:disabled {
     background-color: #cccccc;
     border-color: #cccccc;
     cursor: not-allowed;
     opacity: 0.7;
}

/* --- Mobile Specific Adjustments (can refine breakpoint) --- */
@media (max-width: 600px) {
    form._service_confirm {
        padding: 15px; /* Less padding on smaller screens */
        margin: 15px 10px; /* Adjust margin */
    }

    form._service_confirm fieldset legend {
        font-size: 1.1em; /* Slightly smaller legend */
    }

    form._service_confirm label {
         font-size: 0.9em; /* Slightly smaller labels */
    }

    form._service_confirm input[type="text"],
    form._service_confirm input[type="email"],
    form._service_confirm input[type="tel"],
    form._service_confirm input[type="number"],
    form._service_confirm input[type="file"],
    form._service_confirm textarea {
        padding: 9px 10px; /* Adjust padding */
        font-size: 0.95rem;
    }
     form._service_confirm input[type="submit"] {
        padding: 10px 15px;
        font-size: 1em;
    }
}

/* --- End Confirmation Form Styling --- */










/* Labels */
label {
    font-weight: bold;
    color: #333;
}

/* Input fields (text, email, tel, number), textarea */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    color: #555;
    box-sizing: border-box; /* Make padding and border included in the width */
}

/* Textarea */
textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 100px;
}

/* File input */
input[type="file"] {
    font-size: 16px;
    color: #555;
}

/* Submit button */
input[type="submit"] {
    background-color: #4CAF50; /* Green */
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

input[type="submit"]:hover {
    background-color: #3e8e41;
}

/* Progress bar */
.progress {
    width: 100%;
    height: 20px;
    background-color: #f0f0f0;
    border-radius: 5px;
    margin-bottom: 10px;
}

.progress-bar {
    background-color: #007bff; /* สีเริ่มต้น */
    color: white;
    text-align: center;
    height: 20px;
    border-radius: 5px;
    transition: width 0.3s ease-in-out; /* Animation */
}

.progress-bar.bg-success {
    background-color: #28a745; /* สีเมื่ออัปโหลดสำเร็จ */
}

/* Error message */
p[style="color:red;"] {
    color: red;
    font-size: 0.9em;
    margin-top: -10px;
}

/* Responsive design */
@media (max-width: 768px) {
    form {
        padding: 10px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea,
    input[type="file"],
    input[type="submit"] {
        font-size: 14px;
    }

     input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    textarea {
        font-size: 14px;
    }
}

.error-message {
    color: red;
    font-size: 0.8em;
    margin-top: 5px;
    display: block; /* Make sure it's displayed below the input */
}

.is-invalid {
    border-color: red; /* Add red border to invalid inputs */
}

 /*---------------------- popup ---------------------- */
.order-success-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* ปรับความเข้มของพื้นหลัง */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0; /* ซ่อนป๊อปอัปเริ่มต้น */
    transition: opacity 0.3s ease-in-out; /* เพิ่ม animation */
}

.order-success-popup.show {
    opacity: 1; /* แสดงป๊อปอัป */
}

.order-success-popup-content {
    background-color: #fff;
    padding: 30px; /* เพิ่ม padding */
    border-radius: 10px; /* เพิ่ม border radius */
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* เพิ่ม shadow */
    width: 80%; /* กำหนดความกว้าง */
    max-width: 500px; /* จำกัดความกว้างสูงสุด */
}

.order-success-popup-content p {
    font-size: 18px; /* ปรับขนาดตัวอักษร */
    color: #333; /* ปรับสีตัวอักษร */
    margin-bottom: 20px; /* เพิ่ม margin */
}

.countdown {
    margin-top: 20px; /* เพิ่ม margin */
    font-size: 16px; /* ปรับขนาดตัวอักษร */
    color: #777; /* ปรับสีตัวอักษร */
}

.countdown-timer {
    font-weight: bold; /* ทำให้ตัวเลขนับถอยหลังเป็นตัวหนา */
    color: #007bff; /* เปลี่ยนสีตัวเลขนับถอยหลัง */
}