/* booking-styles.css - Styles for booking pages */

/* ===== BASE STYLES ===== */
.booking-container {
    margin-top: 50px !important;
    padding: 20px;
    max-width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Fix for mobile full width */
@media (max-width: 767px) {
    .booking-container {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        padding: 15px !important;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .blog-main {
        padding: 0 !important;
    }
}

/* ===== CARD STYLES ===== */
.booking-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 1px solid #e9ecef;
    overflow: hidden;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.booking-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* ===== HEADER STYLES ===== */
.booking-header {
    background: linear-gradient(135deg, #a92928 0%, #c0392b 100%);
    color: white !important;
    padding: 24px 30px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.booking-header h4 {
    margin: 0 !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: white !important;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.booking-header h4 i {
    color: white !important;
    font-size: 26px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ===== ANNOUNCEMENT SECTION ===== */
.booking-announcement {
    padding: 25px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.announcement-textarea {
    width: 100% !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 10px !important;
    padding: 18px !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    resize: none !important;
    background: white !important;
    color: #333 !important;
    min-height: 140px !important;
    max-height: 280px !important;
    overflow-y: auto !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.3s ease;
}

.announcement-textarea:focus {
    outline: none !important;
    border-color: #a92928 !important;
    box-shadow: 0 0 0 4px rgba(169, 41, 40, 0.1) !important;
}

/* ===== FORM STYLES ===== */
.booking-form {
    padding: 30px;
}

.form-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

@media (min-width: 768px) {
    .form-section {
        flex-direction: row;
        gap: 30px;
    }
}

.booking-form-group {
    flex: 1;
    margin-bottom: 0;
}

.booking-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-select, .booking-input {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    background: white !important;
    color: #333 !important;
    transition: all 0.3s ease !important;
}

.booking-select:focus, .booking-input:focus {
    border-color: #a92928 !important;
    box-shadow: 0 0 0 4px rgba(169, 41, 40, 0.1) !important;
    outline: none !important;
}

/* ===== DATEPICKER STYLES ===== */
.datepicker-wrapper .input-group {
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.datepicker-wrapper .input-group:focus-within {
    border-color: #a92928;
    box-shadow: 0 0 0 4px rgba(169, 41, 40, 0.1);
}

.datepicker-wrapper .input-group .form-control {
    border: none !important;
    padding: 14px 16px !important;
}

.datepicker-wrapper .input-group-btn .btn {
    background: #a92928;
    color: white;
    border: none;
    padding: 14px 20px;
    transition: all 0.3s ease;
}

.datepicker-wrapper .input-group-btn .btn:hover {
    background: #8c1f1e;
}

/* ===== TIMESLOT SECTION ===== */
.booking-timeslots {
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f5 100%);
    margin: 20px 30px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.timeslot-header {
    margin-bottom: 25px;
    text-align: center;
}

.timeslot-header h4 {
    color: #2c3e50;
    margin: 0 0 15px 0 !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.selected-date {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-radius: 10px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #2e7d32;
    font-weight: 600;
    border: 2px solid #c8e6c9;
}

.selected-date i {
    font-size: 18px;
    color: #2e7d32;
}

/* TIMESLOT GRID - แก้ไขเฉพาะจุดนี้ */
.timeslot-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0 30px;
}

/* PC: 4 columns */
@media (min-width: 768px) {
    .timeslot-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile: 2 columns */
@media (max-width: 767px) {
    .timeslot-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px;
    }
}

/* ===== TIMESLOT ITEM ===== */
.timeslot-item {
    position: relative;
}

.timeslot-item input[type="radio"] {
    display: none;
}

.timeslot-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px 15px;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    min-height: 110px;
    position: relative;
    overflow: hidden;
}

/* Hover effect */
.timeslot-label:hover {
    border-color: #a92928;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(169, 41, 40, 0.15);
}

/* Selected state */
.timeslot-item input[type="radio"]:checked + .timeslot-label {
    border-color: #a92928;
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(169, 41, 40, 0.2);
    animation: pulse 0.5s ease;
}

/* Click animation */
.timeslot-label.clicked {
    animation: clickEffect 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pulse {
    0% { transform: scale(1) translateY(-2px); }
    50% { transform: scale(1.02) translateY(-2px); }
    100% { transform: scale(1) translateY(-2px); }
}

@keyframes clickEffect {
    0% { transform: scale(1); }
    25% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    75% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

/* Timeslot content */
.timeslot-name {
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.3;
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}

.timeslot-period {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.timeslot-available {
    font-size: 13px;
    color: #28a745;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(40, 167, 69, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    margin-top: 5px;
}

.timeslot-available i {
    font-size: 12px;
}

/* Badge for selected */
.timeslot-label::after {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s ease;
}

.timeslot-item input[type="radio"]:checked + .timeslot-label::after {
    background: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

/* ===== SUBMIT BUTTON ===== */
.booking-submit {
    text-align: center;
    padding-top: 25px;
    border-top: 2px solid #e9ecef;
    margin-top: 20px;
}

.booking-confirm-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 16px 45px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 17px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.25);
    position: relative;
    overflow: hidden;
}

.booking-confirm-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.35);
    background: linear-gradient(135deg, #218838 0%, #1ba87e 100%);
}

.booking-confirm-btn:active {
    transform: translateY(-1px);
}

.booking-confirm-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.booking-confirm-btn.enabled-pulse {
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0% { box-shadow: 0 6px 20px rgba(40, 167, 69, 0.25); }
    50% { box-shadow: 0 6px 30px rgba(40, 167, 69, 0.4); }
    100% { box-shadow: 0 6px 20px rgba(40, 167, 69, 0.25); }
}

.booking-confirm-btn i {
    font-size: 20px;
}

/* ===== SCROLL TO BUTTON STYLES ===== */
.scroll-to-button-container {
    position: sticky;
    bottom: 20px;
    z-index: 1000;
    text-align: center;
    margin-top: 20px;
    display: none;
}

.scroll-to-button {
    background: linear-gradient(135deg, #a92928 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(169, 41, 40, 0.3);
    transition: all 0.3s ease;
}

.scroll-to-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(169, 41, 40, 0.4);
}

.scroll-to-button i {
    font-size: 16px;
    animation: arrowBounce 2s infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Selection feedback */
.selection-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: 600;
    z-index: 10000;
    animation: feedbackFade 2s ease;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes feedbackFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* ===== ALERT MESSAGES ===== */
.booking-full, .booking-error, .booking-closed {
    padding: 20px 30px;
    border-radius: 12px;
    margin: 20px 30px;
}

.alert {
    border-radius: 12px;
    border: none;
    border-left: 5px solid;
    padding: 20px 25px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-danger {
    background: linear-gradient(135deg, #ffeaea 0%, #fff5f5 100%);
    border-left-color: #dc3545;
    color: #721c24;
}

.alert i {
    font-size: 24px;
    flex-shrink: 0;
}

/* ===== TERMS PAGE STYLES ===== */
.terms-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 1px solid #e9ecef;
    overflow: hidden;
    margin-bottom: 30px;
}

.terms-header {
    background: linear-gradient(135deg, #a92928 0%, #c0392b 100%);
    color: white !important;
    padding: 28px 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.terms-header h2 {
    margin: 0 !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.terms-header h2 i {
    color: white !important;
    font-size: 30px;
}

/* ... (ส่วนที่เหลือเหมือนเดิม) ... */

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 767px) {
    .booking-header h4, .terms-header h2 {
        font-size: 20px !important;
    }
    
    .booking-header, .terms-header {
        padding: 20px !important;
    }
    
    .booking-header h4 i, .terms-header h2 i {
        font-size: 22px;
    }
    
    .terms-content, .booking-form {
        padding: 20px !important;
    }
    
    .booking-timeslots {
        margin: 20px 15px !important;
        padding: 20px !important;
    }
    
    .agreement-buttons {
        flex-direction: column;
    }
    
    .terms-agree-btn, .terms-cancel-btn {
        width: 100%;
        min-width: auto;
    }
    
    .term-text {
        font-size: 15px;
    }
    
    .timeslot-label {
        padding: 18px 12px;
        min-height: 100px;
    }
    
    .timeslot-name {
        font-size: 15px;
    }
    
    .booking-confirm-btn {
        padding: 14px 30px;
        font-size: 16px;
        width: 100%;
    }
    
    .scroll-to-button {
        padding: 10px 20px;
        font-size: 14px;
        width: 90%;
        max-width: 300px;
    }
}

/* ลบส่วนนี้เพราะต้องการให้ mobile แสดง 2 columns เสมอ */
/* @media (max-width: 480px) {
    .timeslot-grid {
        grid-template-columns: 1fr !important;
    }
    
    .timeslot-name {
        font-size: 16px;
    }
} */

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mb-20 {
    margin-bottom: 20px !important;
}

.mt-20 {
    margin-top: 20px !important;
}

/* ===== REMOVE ERROR BORDERS ===== */
.has-error, .is-invalid {
    border-color: #e0e0e0 !important;
}

.has-error:focus, .is-invalid:focus {
    border-color: #a92928 !important;
}

/* เพิ่มใน booking-styles.css */
.selection-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(40, 167, 69, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: 600;
    z-index: 10000;
    animation: feedbackFade 2s ease;
    pointer-events: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes feedbackFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

.timeslot-label.clicked {
    animation: clickEffect 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes clickEffect {
    0% { transform: scale(1); }
    25% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    75% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

.booking-confirm-btn.enabled-pulse {
    animation: buttonPulse 2s infinite;
}

@keyframes buttonPulse {
    0% { box-shadow: 0 6px 20px rgba(40, 167, 69, 0.25); }
    50% { box-shadow: 0 6px 30px rgba(40, 167, 69, 0.4); }
    100% { box-shadow: 0 6px 20px rgba(40, 167, 69, 0.25); }
}
/* ===== TERMS PAGE STYLES ===== */
.terms-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border: 1px solid #e9ecef;
    overflow: hidden;
    margin-bottom: 30px;
}

.terms-header {
    background: linear-gradient(135deg, #a92928 0%, #c0392b 100%);
    color: white !important;
    padding: 28px 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.terms-header h2 {
    margin: 0 !important;
    font-size: 28px !important;
    font-weight: 700 !important;
    color: white !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.terms-header h2 i {
    color: white !important;
    font-size: 30px;
}

.terms-content {
    padding: 30px;
}

.terms-list {
    margin-bottom: 30px;
}

.term-item {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.term-number {
    background: #a92928;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
    margin-top: 2px;
}

.term-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
}

.terms-agreement {
    border-top: 2px solid #e9ecef;
    padding-top: 25px;
    margin-top: 20px;
}

.terms-form {
    margin-top: 20px;
}

.agreement-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.terms-agree-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.terms-agree-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.terms-cancel-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.terms-cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
}

/* Responsive สำหรับหน้าเงื่อนไข */
@media (max-width: 767px) {
    .terms-content {
        padding: 20px !important;
    }
    
    .agreement-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .terms-agree-btn, .terms-cancel-btn {
        width: 100%;
        min-width: auto;
    }
    
    .term-text {
        font-size: 15px;
    }
    
    .term-number {
        width: 25px;
        height: 25px;
        font-size: 14px;
        margin-right: 12px;
    }
}