/* FILE: /meeting-room/widget/assets/css/widget-style.css 
    LATEST UPDATE: จัดลำดับรายการย่อยใหม่ รองรับการยืดตัวและแสดงรายละเอียดครบถ้วน
*/

@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@300;400;500;600&display=swap');

.bkr-widget-wrapper {
    font-family: 'Sarabun', sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background-color: #ffffff;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.bkr-widget-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0d6efd;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.bkr-widget-header i {
    margin-right: 10px;
}

.bkr-widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ปรับให้แต่ละห้องประชุมเป็นบล็อกแนวตั้ง */
.bkr-room-item {
    display: block;
    border-bottom: 1px solid #f0f0f0;
    padding: 15px 0;
}

.bkr-room-item:last-child {
    border-bottom: none;
}

/* ส่วนหัวของห้องประชุม (ชื่อห้อง + สถานะหลัก) */
.bkr-room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bkr-room-header strong {
    font-size: 1.1rem;
    color: #333;
}

/* สถานะวงกลม ว่าง/ไม่ว่าง */
.bkr-widget-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #fff;
    text-transform: uppercase;
}

.bkr-status-available {
    background-color: #28a745; /* เขียว */
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.bkr-status-booked {
    background-color: #dc3545; /* แดง */
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

/* รายการจองย่อย (Detail List) */
.bkr-detail-list {
    list-style: none;
    padding: 12px;
    margin: 5px 0 0 0;
    background-color: #f8f9fa;
    border-left: 4px solid #0d6efd;
    border-radius: 0 6px 6px 0;
}

.bkr-detail-list li {
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ced4da;
    font-size: 0.9rem;
    line-height: 1.6;
}

.bkr-detail-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* จัดการสีตัวอักษรและไอคอน */
.bkr-detail-list i {
    margin-right: 5px;
    color: #6c757d;
}

.text-primary {
    color: #0d6efd !important;
}

.text-success {
    color: #198754 !important;
}

.text-warning {
    color: #fd7e14 !important; /* สีส้มสำหรับรออนุมัติ */
}

.fw-bold {
    font-weight: 600;
}

/* ส่วนท้ายและปุ่ม */
.bkr-widget-footer {
    margin-top: 25px;
    display: flex;
    gap: 12px;
}

.bkr-widget-button {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.2s ease;
    color: #fff !important;
}

.bkr-widget-button i {
    margin-right: 8px;
}

/* สีปุ่มหลัก (ดูข้อมูล/จองห้อง) */
.bkr-widget-button:not(.admin-btn) {
    background-color: #0d6efd;
}

.bkr-widget-button:not(.admin-btn):hover {
    background-color: #0b5ed7;
    transform: translateY(-1px);
}

/* สีปุ่มแอดมิน */
.bkr-widget-button.admin-btn {
    background-color: #6c757d;
}

.bkr-widget-button.admin-btn:hover {
    background-color: #5c636a;
    transform: translateY(-1px);
}

/* รองรับหน้าจอมือถือ */
@media (max-width: 480px) {
    .bkr-widget-footer {
        flex-direction: column;
    }
    .bkr-room-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}