/* Import Kanit font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&display=swap');

/* Basic Body Styles */
body {
    font-family: 'Kanit', sans-serif;
    margin: 0;
    background-color: #fff; /* เปลี่ยนเป็นสีขาว */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main Container Styles */
.container {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    flex-grow: 1;
    color: #000; /* ข้อความหลักเป็นสีดำ */
}

.left-section {
    width: 40%;
    padding-right: 20px;
}

.right-section {
    width: 60%;
    border-radius: 8px;
    overflow: hidden;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 1.5em;
    color: #dc3545; /* เปลี่ยนเป็นสีแดง */
    margin: 0;
    font-family: 'Kanit', sans-serif;
}

.header .btn-info {
    font-size: 0.9em;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    background-color: #6c757d; /* สีเทาเข้ม */
    color: #fff;
    border: none;
    font-family: 'Kanit', sans-serif;
}

.header .btn-info:hover {
    background-color: #5a6268;
}

/* Additional Services Panel Styles */
.additional-services-panel {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

.additional-services-panel h3 {
    font-size: 1.1em;
    color: #dc3545; /* เปลี่ยนเป็นสีแดง */
    margin-top: 0;
    margin-bottom: 15px;
    font-family: 'Kanit', sans-serif;
}

.additional-services-panel .service-option {
    margin-bottom: 10px;
}

.additional-services-panel .form-check-label {
    font-size: 0.95em;
    color: #333;
    margin-left: 5px;
    font-family: 'Kanit', sans-serif;
}

.additional-services-panel .form-check-input {
    margin-top: 0.3em;
}

/* Adjusted Input Group for Porter Quantity */
.additional-services-panel .input-group {
    display: flex;
    align-items: center;
    width: fit-content;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    overflow: hidden;
}

.additional-services-panel .input-group .btn {
    font-size: 0.85em;
    padding: 0.25rem 0.75rem;
    border-radius: 0;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background-color: #f8f9fa;
    color: #495057;
}

.additional-services-panel .input-group .btn:hover {
    background-color: #e2e6ea;
}

.additional-services-panel .input-group .form-control {
    width: 50px;
    flex-grow: 0;
    text-align: center;
    border: none;
    border-radius: 0;
    height: 38px;
    padding: 0.375rem 0.75rem;
    font-family: 'Kanit', sans-serif;
    color: #000;
}

#porter-price-per-person {
    font-size: 0.9em;
    color: #555;
    margin-left: 10px;
    white-space: nowrap;
    font-family: 'Kanit', sans-serif;
}

/* Price Summary Styles */
.price-summary {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

.price-summary h2 {
    font-size: 1.2em;
    color: #dc3545; /* เปลี่ยนเป็นสีแดง */
    margin-top: 0;
    margin-bottom: 10px;
    font-family: 'Kanit', sans-serif;
}

.price-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
    font-family: 'Kanit', sans-serif;
    color: #333;
}

.price-total {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    font-weight: bold;
    font-family: 'Kanit', sans-serif;
    color: #000;
}

.price-total span {
    color: #dc3545; /* เน้นราคารวมด้วยสีแดง */
}

/* Button Styles */
.btn-confirm {
    background-color: #dc3545; /* เปลี่ยนเป็นสีแดง */
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    margin-bottom: 10px;
    font-family: 'Kanit', sans-serif;
}

.btn-confirm:hover {
    background-color: #c82333; /* สีแดงเข้มขึ้นเมื่อ Hover */
}

.btn-back {
    background-color: #f8f9fa;
    color: #343a40;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    width: 100%;
    text-align: center;
    text-decoration: none;
    margin-bottom: 15px;
    font-family: 'Kanit', sans-serif;
}

.btn-back:hover {
    background-color: #e2e6ea;
}

/* Truck Info Panel Styles */
.truck-info-panel {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

.truck-info-panel h3 {
    font-size: 1.1em;
    color: #dc3545; /* เปลี่ยนเป็นสีแดง */
    margin-top: 0;
    margin-bottom: 10px;
    font-family: 'Kanit', sans-serif;
}

.selected-truck {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #f9f9f9;
    color: #333;
}

.selected-truck img {
    max-width: 100px;
    height: auto;
    margin-right: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.selected-truck-details {
    flex-grow: 1;
}

.selected-truck-details h4 {
    font-size: 1em;
    margin-top: 0;
    margin-bottom: 5px;
    font-family: 'Kanit', sans-serif;
    color: #333;
}

.selected-truck-details p {
    font-size: 0.8em;
    color: #777;
    margin-bottom: 0;
    font-family: 'Kanit', sans-serif;
}

.edit-button {
    color: #007bff; /* คงสีฟ้าไว้ หรือเปลี่ยนเป็นสีแดงอ่อน */
    cursor: pointer;
    font-size: 0.8em;
    font-family: 'Kanit', sans-serif;
}

/* Quantity Selector Styles */
.quantity-selector {
    display: flex;
    align-items: center;
}

.quantity-selector button {
    padding: 5px 10px;
    border: 1px solid #ccc;
    background-color: #eee;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
    margin: 0 5px;
    font-family: 'Kanit', sans-serif;
    color: #333;
}

/* Location Info Panel Styles */
.location-info-panel {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

.location-info-panel h3 {
    font-size: 1.1em;
    color: #dc3545; /* เปลี่ยนเป็นสีแดง */
    margin-top: 0;
    margin-bottom: 10px;
    font-family: 'Kanit', sans-serif;
}

.location-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: #333;
}

.location-item .number {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #555;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8em;
    margin-right: 10px;
    border: 1px solid #ccc;
    font-family: 'Kanit', sans-serif;
}

.location-item .address {
    flex-grow: 1;
    font-size: 0.9em;
    color: #333;
    font-family: 'Kanit', sans-serif;
}

.edit-location {
    color: #007bff; /* คงสีฟ้าไว้ หรือเปลี่ยนเป็นสีแดงอ่อน */
    cursor: pointer;
    font-size: 0.8em;
    margin-left: 10px;
    font-family: 'Kanit', sans-serif;
}

/* Benefits Panel Styles */
.benefits-panel {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    color: #333;
}

.benefits-panel h3 {
    font-size: 1.1em;
    color: #dc3545; /* เปลี่ยนเป็นสีแดง */
    margin-top: 0;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Kanit', sans-serif;
}

.benefits-panel h3 .arrow-icon {
    font-size: 0.9em;
    color: #777;
    cursor: pointer;
}

.benefits-list {
    padding-left: 20px;
    font-size: 0.9em;
    color: #555;
    font-family: 'Kanit', sans-serif;
}

.benefits-list li {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.benefits-list li .check-icon {
    color: #28a745; /* คงสีเขียวไว้ หรือเปลี่ยนเป็นสีแดงอ่อน */
    margin-right: 5px;
}

/* User Info Panel Styles */
.user-info-panel {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    color: #333;
}

.user-info-panel h3 {
    font-size: 1.1em;
    color: #dc3545; /* เปลี่ยนเป็นสีแดง */
    margin-top: 0;
    margin-bottom: 10px;
    font-family: 'Kanit', sans-serif;
}

.user-info-panel .form-group {
    margin-bottom: 10px;
}

.user-info-panel label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
    color: #555;
    font-family: 'Kanit', sans-serif;
}

.user-info-panel input.form-control {
    padding: 0.7rem;
    font-size: 0.9rem;
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    font-family: 'Kanit', sans-serif;
    color: #000;
}

/* Booking Data Panel Styles */
.booking-data-panel {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: #343a40;
    white-space: pre-wrap;
    overflow-x: auto;
    font-family: 'Kanit', sans-serif;
}

.booking-data-panel strong {
    font-weight: bold;
    color: #dc3545; /* เปลี่ยนเป็นสีแดง */
}

/* --- Responsive Adjustments --- */

/* Responsive for Tablets (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        flex-direction: column;
        padding: 30px;
        margin: 20px auto;
    }

    .left-section {
        width: 100%;
        padding-right: 0;
        margin-bottom: 30px;
    }

    .right-section {
        width: 100%;
        height: auto;
    }

    #map-container {
        height: 500px;
    }
}

/* Responsive for Mobile (smaller than 768px) */
@media (max-width: 767px) {
    body {
        padding: 10px;
    }

    .container {
        flex-direction: column;
        padding: 20px;
        margin: 10px auto;
    }

    .left-section {
        width: 100%;
        padding-right: 0;
        margin-bottom: 20px;
    }

    .right-section {
        width: 100%;
        height: auto;
    }

    #map-container {
        height: 300px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header h1 {
        margin-bottom: 10px;
    }

    .selected-truck img {
        max-width: 80px;
    }
}

/* --- CSS for Truck Selection Modal --- */
.truck-options-container {
    padding: 10px;
}

.truck-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: 'Kanit', sans-serif;
    background-color: #fff;
    color: #000;
}

.truck-card:hover {
    border-color: #dc3545; /* เปลี่ยนเป็นสีแดง */
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.2);
}

.truck-card.selected-truck-card {
    border-color: #dc3545; /* เปลี่ยนเป็นสีแดง */
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.4);
}

.truck-card img {
    max-width: 120px;
    height: auto;
    margin: 0 auto 15px auto;
    display: block;
}

.truck-card .card-title {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
    color: #343a40;
    font-family: 'Kanit', sans-serif;
}

.truck-card .card-text {
    font-size: 0.9em;
    color: #555;
    min-height: 40px;
    font-family: 'Kanit', sans-serif;
}

.truck-card .btn-select-truck {
    margin-top: 15px;
    width: 100%;
    background-color: #6c757d; /* สีเทาเข้ม */
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 1em;
    font-family: 'Kanit', sans-serif;
}

.truck-card .btn-select-truck:hover {
    background-color: #5a6268;
}

/* Responsive for Modal Truck Selection */
@media (max-width: 767px) {
    .truck-options-container .col-md-4 {
        width: 100%;
    }
}

/* --- Footer Styles --- */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    background-color: #000; /* เปลี่ยนเป็นสีดำ */
    color: #fff; /* ข้อความเป็นสีขาว */
    font-size: 0.85em;
    width: 100%;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
    font-family: 'Kanit', sans-serif;
}

.footer p {
    margin: 0;
}

.footer a {
    color: #fff;
    text-decoration: none;
    margin-left: 10px;
    font-family: 'Kanit', sans-serif;
}

.footer a:hover {
    text-decoration: underline;
}

/* --- Booking Success Modal Styles --- */
#bookingSuccessModal .modal-content {
    background-color: #fff;
    color: #000;
    border: 1px solid #ddd;
    border-radius: 8px;
}

#bookingSuccessModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

#bookingSuccessModal .modal-title {
    color: #dc3545; /* หัวข้อ Modal เป็นสีแดง */
    font-family: 'Kanit', sans-serif;
}

#bookingSuccessModal .btn-close {
    color: #000;
}

#bookingSuccessModal .modal-body {
    padding: 20px;
    font-family: 'Kanit', sans-serif;
    font-size: 0.9em;
}

#bookingSuccessModal .modal-footer {
    border-top: 1px solid #eee;
    padding: 15px;
    display: flex;
    justify-content: flex-end;
}

#bookingSuccessModal .btn-secondary {
    background-color: #6c757d;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 1em;
    font-family: 'Kanit', sans-serif;
    margin-left: 10px;
}

#bookingSuccessModal .btn-secondary:hover {
    background-color: #5a6268;
}

#bookingSuccessModal .btn-primary {
    background-color: #007bff; /* คุณอาจต้องการเปลี่ยนเป็นสีแดง */
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 1em;
    font-family: 'Kanit', sans-serif;
    margin-left: 10px;
}

#bookingSuccessModal .btn-primary:hover {
    background-color: #0056b3;
}

#bookingSuccessModal #lineOaButton {
    background-color: #28a745; /* สีเขียว LINE */
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 1em;
    font-family: 'Kanit', sans-serif;
    margin-left: 10px;
    text-decoration: none;
}

#bookingSuccessModal #lineOaButton:hover {
    background-color: #1e7e34;
}

/* --- Booking Slip Styles in Modal --- */
#bookingSlipContent .slip-container {
    font-family: 'Kanit', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 12px;
    line-height: 1.6;
    color: #333;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fff;
}
#bookingSlipContent .slip-header {
    text-align: center;
    margin-bottom: 15px;
}
#bookingSlipContent .slip-header h4 {
    color: #dc3545; /* สีแดงสำหรับหัวข้อสลิป */
    margin-bottom: 5px;
    font-size: 1.2em;
}
#bookingSlipContent .slip-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed #eee;
}
#bookingSlipContent .slip-item:last-child {
    border-bottom: none;
}
#bookingSlipContent .slip-item strong {
    flex-basis: 60%;
    text-align: left;
    color: #000;
}
#bookingSlipContent .slip-item span {
    flex-basis: 40%;
    text-align: right;
    color: #333;
}
#bookingSlipContent .slip-total {
    font-size: 14px;
    font-weight: bold;
    margin-top: 15px;
    border-top: 2px solid #333;
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
    color: #dc3545; /* ราคารวมในสลิปเป็นสีแดง */
}
#bookingSlipContent .slip-note {
    font-size: 10px;
    color: #666;
    margin-top: 15px;
    text-align: center;
}
@media print {
    body * {
        visibility: hidden;
    }
    #bookingSuccessModal, #bookingSuccessModal * {
        visibility: visible;
    }
    #bookingSuccessModal .modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        border: none;
        box-shadow: none;
    }
    #bookingSuccessModal .modal-header,
    #bookingSuccessModal .modal-footer {
        display: none;
    }
    #bookingSlipContent .slip-container {
        border: none;
        padding: 0;
        margin: 0;
    }
}