/* ========================================================================
   ALAF ROOM BOOKING - MASTER STYLESHEET
   Description: Clean, organized styles for Dashboard & Compact Booking Form
======================================================================== */

/* --- 1. GLOBAL VARIABLES --- */
:root {
    --primary: #1a73e8;
    --primary-hover: #1557b0;
    --bg-light: #f1f3f4;
    --bg-white: #ffffff;
    --bg-gray: #f8f9fa;
    --border-color: #dadce0;
    --text-main: #202124;
    --text-dim: #70757a;
    --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-large: 0 10px 30px rgba(0,0,0,0.08);
}

/* --- 2. DASHBOARD LAYOUT --- */
.alaf-dashboard-wrapper {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background: var(--bg-light);
    padding: 20px;
    border-radius: 12px;
}

.alaf-flex-layout { 
    display: flex; 
    gap: 20px; 
    align-items: stretch; /* Seimbangkan ketinggian panel kiri & kanan */
}

.alaf-calendar-panel { 
    flex: 1.8; 
    min-width: 0; 
}

.alaf-sidebar-panel { 
    flex: 1; 
    min-width: 320px; 
    display: flex; 
    flex-direction: column; 
    gap: 20px; /* Jarak antara Card Details & Card Booking */
}

/* Base Card Style */
.alaf-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 20px;
    width: 100%;
}

.shadow-sm { box-shadow: var(--shadow); }

/* --- 3. ROOM NAVIGATION TABS --- */
.alaf-tabs-container { margin-bottom: 20px; }

.alaf-room-tabs {
    list-style: none; 
    padding: 0; 
    margin: 0;
    display: flex; 
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.alaf-room-tabs li {
    padding: 10px 20px;
    background: var(--bg-white);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: 0.3s ease;
    border: 1px solid var(--border-color);
}

.alaf-room-tabs li.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(26, 115, 232, 0.3);
}

/* --- 4. FULLCALENDAR OVERRIDES --- */
#alaf-calendar { max-width: 100%; min-height: 600px; }

#alaf-calendar .fc-toolbar-title { font-size: 1.4rem; font-weight: 600; color: #3c4043; }

#alaf-calendar .fc-button { 
    background: var(--bg-white) !important; 
    border: 1px solid var(--border-color) !important; 
    color: #3c4043 !important; 
    text-transform: none; 
}

#alaf-calendar .fc-button-active { background: var(--bg-light) !important; }

#alaf-calendar .fc-daygrid-day-number { 
    font-size: 13px; color: var(--text-dim); text-decoration: none !important; 
}

#alaf-calendar .fc-day-today { background: rgba(26, 115, 232, 0.04) !important; }

#alaf-calendar .fc-day-today .fc-daygrid-day-number { 
    background: var(--primary); color: #fff; border-radius: 50%; 
    width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
}

.alaf-calendar-footer-info {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 10px; font-size: 12px; color: var(--text-dim); font-weight: 500;
}

.slot-label { 
    border-top: 2px solid #ddd; flex-grow: 1; margin: 0 15px; text-align: center; padding-top: 5px; 
}

/* --- 5. SIDEBAR DETAILS CARD --- */
.sidebar-header { border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 20px; }

.header-main h2 { margin: 0; font-size: 22px; font-weight: 700; color: #1a202c; }

.room-subtitle { margin: 5px 0 0; font-size: 14px; color: var(--text-dim); }

.booking-list-container {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 450px;
    padding-right: 5px;
}

.booking-card { display: flex; gap: 15px; margin-bottom: 25px; align-items: flex-start; }

.time-box { text-align: right; min-width: 75px; }

.t-start { font-size: 14px; font-weight: 700; color: #2d3748; display: block; }

.t-end { font-size: 11px; color: #a0aec0; }

.info-box h4 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }

.empty-state { text-align: center; color: #a0aec0; padding-top: 50px; font-size: 14px; }

/* --- 6. SIDEBAR ACTION CARD (ASING) --- */
.action-card-separated {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.action-header-inline {
    display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px;
}

.action-header-inline h3 { margin: 0; font-size: 18px; font-weight: 700; }

.action-icon-small {
    width: 32px; height: 32px; background: #e8f0fe; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.action-icon-small svg { width: 18px; height: 18px; }

.action-card-separated p { font-size: 13px; color: var(--text-dim); margin-bottom: 15px; }

.btn-book-now {
    display: block;
    background: var(--primary);
    color: #fff !important;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    transition: 0.3s;
}

.btn-book-now:hover { background: var(--primary-hover); box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2); }

/* --- 7. COMPACT BOOKING FORM (FRONTEND) --- */
.alaf-booking-wrapper {
    max-width: 750px;
    margin: 40px auto;
    padding: 30px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-large);
    font-family: 'Poppins', sans-serif;
}

.alaf-form-header {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.alaf-form-header h2 { margin: 0; color: var(--text-main); font-size: 1.5rem; }

.room-meta-info {
    font-size: 0.85rem; color: var(--text-dim); margin-top: 5px;
    display: flex; gap: 15px;
}

.form-section-title {
    font-size: 0.85rem; font-weight: 700; color: var(--primary);
    text-transform: uppercase; margin: 15px 0 10px;
    border-left: 4px solid var(--primary); padding-left: 10px;
}

.alaf-modern-form { display: flex; flex-direction: column; gap: 18px; }

.alaf-grid-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.alaf-grid-row.three-cols { grid-template-columns: 1.5fr 1fr 1fr; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label { font-weight: 600; font-size: 0.85rem; color: #333; }

.form-group.full-width { grid-column: span 2; }

.alaf-modern-form input, 
.alaf-modern-form select, 
.alaf-modern-form textarea {
    padding: 12px; border: 1px solid var(--border-color);
    border-radius: 8px; font-size: 0.9rem; background: #fafafa; transition: 0.2s;
}

.alaf-modern-form input:focus, 
.alaf-modern-form select:focus, 
.alaf-modern-form textarea:focus {
    border-color: var(--primary); background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1); outline: none;
}

.alaf-submit-button {
    background: var(--primary) !important; color: white !important;
    border: none !important; padding: 16px !important; font-weight: 700 !important;
    border-radius: 10px !important; cursor: pointer; transition: 0.3s; margin-top: 10px;
}

.alaf-submit-button:hover {
    background: var(--primary-hover) !important; transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26, 115, 232, 0.2);
}

/* Status Messages */
/* Status Messages - Tambah margin-top */
.alaf-msg-info, .alaf-msg-success, .alaf-msg-error {
    margin-top: 15px; /* Tambah ni supaya ada gap dengan butang kat atas */
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center; /* Bagi mesej duduk tengah, baru lawa */
}
/* --- 8. ROOM GRID VIEW (GALLERY) --- */
.alaf-room-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
}

.alaf-room-card {
    border: 1px solid var(--border-color); border-radius: 12px;
    overflow: hidden; background: var(--bg-white); transition: transform 0.3s;
}

.alaf-room-card:hover { transform: translateY(-5px); }

.alaf-room-image img { width: 100%; height: 180px; object-fit: cover; }

.alaf-room-info { padding: 15px; }

/* --- 9. RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    .alaf-flex-layout { flex-direction: column; }
    .alaf-sidebar-panel { min-width: 100%; }
}

@media (max-width: 600px) {
    .alaf-grid-row, .alaf-grid-row.three-cols { grid-template-columns: 1fr; }
    .form-group.full-width { grid-column: span 1; }
    .alaf-booking-wrapper { margin: 15px; padding: 20px; }
}