/* =========================================================
   LMTC ROOM DETAIL
========================================================= */

:root {
    --room-primary: #0b477f;
    --room-primary-dark: #073661;
    --room-primary-light: #eaf3fc;

    --room-text: #183b60;
    --room-muted: #75879b;

    --room-page: #f5f8fc;
    --room-white: #ffffff;

    --room-border: #dce5ef;

    --room-green: #26855b;
    --room-green-bg: #eaf7f0;

    --room-orange: #aa741c;
    --room-orange-bg: #fff6df;

    --room-red: #cc414d;
    --room-red-bg: #fff0f1;

    --room-shadow:
        0 12px 32px rgba(17, 59, 101, 0.07);
}


/* =========================================================
   PAGE
========================================================= */

.room-detail-page {
    padding: 34px 0 70px;

    background: var(--room-page);
}

.room-detail-container {
    width: min(94%, 1450px);

    margin: 0 auto;
}


/* =========================================================
   BACK
========================================================= */

.room-back-btn {
    min-height: 44px;

    padding: 0 16px;

    margin-bottom: 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    color: var(--room-primary);

    background: #ffffff;

    border: 1px solid var(--room-border);
    border-radius: 10px;

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;

    transition: 0.2s ease;
}

.room-back-btn:hover {
    background: #f3f7fb;

    transform: translateX(-2px);
}


/* =========================================================
   ROOM HERO
========================================================= */

.room-hero-card {
    padding: 24px;

    background: #ffffff;

    border: 1px solid var(--room-border);
    border-radius: 20px;

    box-shadow: var(--room-shadow);
}


.room-hero-main {
    display: grid;

    grid-template-columns:
        minmax(420px, 1.15fr)
        minmax(350px, 0.85fr);

    gap: 34px;
}


/* Main Image */

.room-main-image {
    height: 420px;

    overflow: hidden;

    background: #eef4fa;

    border-radius: 16px;
}

.room-main-image img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

.room-image-empty {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #8aa0b7;

    font-size: 60px;
}


/* Room Info */

.room-hero-info {
    display: flex;
    flex-direction: column;

    justify-content: center;
}

.floor-badge {
    width: fit-content;

    padding: 7px 11px;

    display: inline-flex;
    align-items: center;

    gap: 7px;

    color: #356b9d;

    background: #eef5fb;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 700;
}


.room-hero-info h1 {
    margin: 16px 0 0;

    color: var(--room-primary-dark);

    font-size: clamp(
        34px,
        3vw,
        48px
    );

    font-weight: 800;

    line-height: 1.1;
}


.room-hero-info h2 {
    margin: 7px 0 0;

    color: #345b7e;

    font-size: 22px;
    font-weight: 700;
}


.room-type-badge {
    width: fit-content;

    margin-top: 14px;

    padding: 7px 11px;

    display: inline-flex;
    align-items: center;

    gap: 6px;

    color: #356b9d;

    background: #edf5fd;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 700;
}


.room-description {
    max-width: 650px;

    margin: 18px 0 0;

    color: var(--room-muted);

    font-size: 14px;

    line-height: 1.75;
}


/* =========================================================
   SUMMARY
========================================================= */

.room-summary-grid {
    margin-top: 28px;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 12px;
}


.summary-item {
    min-width: 0;

    padding: 14px;

    display: flex;
    align-items: center;

    gap: 11px;

    background: #f7f9fc;

    border: 1px solid #edf1f5;
    border-radius: 11px;
}


.summary-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--room-primary);

    background: #eaf3fc;

    border-radius: 9px;
}


.summary-item strong {
    display: block;

    color: var(--room-primary-dark);

    font-size: 18px;
    font-weight: 800;
}


.summary-item span {
    display: block;

    margin-top: 2px;

    color: #8190a0;

    font-size: 10px;
}


/* =========================================================
   COMMON SECTION
========================================================= */

.detail-section {
    margin-top: 26px;

    padding: 26px;

    background: #ffffff;

    border: 1px solid var(--room-border);
    border-radius: 18px;

    box-shadow: var(--room-shadow);
}


.detail-section-header {
    margin-bottom: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.section-label {
    display: inline-block;

    color: #527aa1;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.9px;
}


.detail-section-header h2 {
    margin: 5px 0 0;

    color: var(--room-primary-dark);

    font-size: 25px;
    font-weight: 800;
}


.detail-section-header p {
    margin: 6px 0 0;

    color: var(--room-muted);

    font-size: 13px;
}


/* =========================================================
   GALLERY
========================================================= */

.photo-gallery {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 12px;
}


.photo-item {
    height: 135px;

    padding: 0;

    overflow: hidden;

    background: #eef4f9;

    border: 2px solid transparent;
    border-radius: 11px;

    cursor: pointer;

    transition: 0.2s ease;
}


.photo-item:hover {
    transform: translateY(-2px);
}


.photo-item.active {
    border-color: var(--room-primary);

    box-shadow:
        0 0 0 3px
        rgba(11, 71, 127, 0.08);
}


.photo-item img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}


/* =========================================================
   INVENTORY TOTAL
========================================================= */

.inventory-total {
    min-width: 135px;

    padding: 11px 14px;

    display: flex;
    align-items: center;

    gap: 10px;

    background: #f2f7fc;

    border: 1px solid #dce8f3;
    border-radius: 10px;

    color: var(--room-primary);
}


.inventory-total > i {
    font-size: 19px;
}


.inventory-total strong {
    display: block;

    font-size: 18px;
    font-weight: 800;
}


.inventory-total span {
    display: block;

    margin-top: 1px;

    color: #7b8d9f;

    font-size: 10px;
}


/* =========================================================
   EQUIPMENT TABLE
========================================================= */

.equipment-table-wrapper {
    width: 100%;

    overflow-x: auto;

    border: 1px solid var(--room-border);
    border-radius: 13px;
}


.equipment-table {
    width: 100%;

    min-width: 900px;

    border-collapse: collapse;

    background: #ffffff;
}


.equipment-table thead {
    background: #f1f5fa;
}


.equipment-table th {
    padding: 15px 16px;

    color: #325779;

    font-size: 12px;
    font-weight: 800;

    text-align: left;

    text-transform: uppercase;

    letter-spacing: 0.35px;

    white-space: nowrap;
}


.equipment-table td {
    padding: 15px 16px;

    color: #405d77;

    border-top: 1px solid #e7edf3;

    vertical-align: middle;

    font-size: 13px;
}


.equipment-table tbody tr {
    transition: 0.18s ease;
}


.equipment-table tbody tr:hover {
    background: #fafcff;
}


/* Number */

.equipment-number {
    color: #75899c;

    font-weight: 700;
}


/* Equipment Name */

.equipment-name-cell {
    display: flex;
    align-items: center;

    gap: 10px;
}


.equipment-table-icon {
    width: 36px;
    height: 36px;

    flex: 0 0 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #3972a6;

    background: #edf5fc;

    border-radius: 8px;
}


.equipment-name-cell strong {
    color: var(--room-primary-dark);

    font-size: 14px;
    font-weight: 800;
}


/* Equipment Photo */

.equipment-photo {
    width: 70px;
    height: 52px;

    padding: 0;

    overflow: hidden;

    border: 1px solid #dce5ef;
    border-radius: 8px;

    background: #eef4f9;

    cursor: pointer;
}


.equipment-photo img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}


.equipment-no-photo {
    width: 70px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #9bacc0;

    background: #f2f5f8;

    border-radius: 8px;
}


/* Quantity */

.quantity-badge {
    min-width: 38px;
    min-height: 30px;

    padding: 0 10px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--room-primary);

    background: #edf5fc;

    border-radius: 8px;

    font-size: 13px;
    font-weight: 800;
}


/* Condition */

.condition-badge {
    min-height: 30px;

    padding: 0 11px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 800;
}


.condition-badge.good {
    color: var(--room-green);

    background: var(--room-green-bg);
}


.condition-badge.fair {
    color: var(--room-orange);

    background: var(--room-orange-bg);
}


.condition-badge.damaged {
    color: var(--room-red);

    background: var(--room-red-bg);
}


.equipment-note {
    max-width: 320px;

    color: #708396 !important;

    line-height: 1.55;
}


/* Empty */

.equipment-empty-row {
    padding: 0 !important;
}


.equipment-empty {
    padding: 55px 20px;

    text-align: center;
}


.equipment-empty-icon {
    width: 55px;
    height: 55px;

    margin: 0 auto 13px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #7896b1;

    background: #edf4fa;

    border-radius: 50%;

    font-size: 21px;
}


.equipment-empty h3 {
    margin: 0;

    color: #41617f;

    font-size: 17px;
}


.equipment-empty p {
    margin: 6px 0 0;

    color: #8292a2;

    font-size: 12px;
}


/* =========================================================
   IMAGE PREVIEW MODAL
========================================================= */

.image-preview-modal {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;
}


.image-preview-modal.show {
    display: flex;
}


.image-preview-overlay {
    position: absolute;

    inset: 0;

    background:
        rgba(6, 25, 44, 0.72);

    backdrop-filter: blur(4px);
}


.image-preview-card {
    position: relative;

    z-index: 2;

    width: min(92vw, 950px);

    padding: 14px;

    background: #ffffff;

    border-radius: 15px;

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, 0.28);
}


.image-preview-card img {
    width: 100%;

    max-height: 75vh;

    display: block;

    object-fit: contain;

    border-radius: 10px;
}


.image-preview-card h3 {
    margin: 12px 5px 3px;

    color: var(--room-primary-dark);

    font-size: 16px;
}


.image-preview-close {
    position: absolute;

    top: -12px;
    right: -12px;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;

    background: var(--room-primary-dark);

    border: 3px solid #ffffff;
    border-radius: 50%;

    cursor: pointer;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .room-hero-main {
        grid-template-columns: 1fr;
    }

    .room-main-image {
        height: 400px;
    }

    .photo-gallery {
        grid-template-columns:
            repeat(4, 1fr);
    }

}


@media (max-width: 780px) {

    .room-detail-container {
        width: calc(100% - 24px);
    }

    .room-hero-card,
    .detail-section {
        padding: 18px;
    }

    .room-main-image {
        height: 300px;
    }

    .room-summary-grid {
        grid-template-columns: 1fr;
    }

    .detail-section-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .photo-gallery {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 520px) {

    .room-detail-page {
        padding-top: 20px;
    }

    .room-main-image {
        height: 240px;
    }

    .room-hero-info h1 {
        font-size: 32px;
    }

    .room-hero-info h2 {
        font-size: 18px;
    }

    .photo-item {
        height: 105px;
    }

}

/* Room Detail Font */
.room-detail-page {
    font-family:
        'Poppins',
        'Noto Sans Khmer',
        Arial,
        sans-serif;
}

/* Back Button */
.room-back-btn {
    font-size: 13px !important;
    font-weight: 600;
}

/* Floor */
.floor-badge {
    font-size: 11px !important;
    font-weight: 700;
}

/* Room Code */
.room-hero-info h1 {
    margin: 12px 0 4px;

    color: #12345a;

    font-family:
        'Poppins',
        sans-serif;

    font-size: 34px !important;
    font-weight: 800 !important;
    line-height: 1.25;
}

/* Room Name */
.room-hero-info h2 {
    margin: 0;

    color: #234d78;

    font-family:
        'Noto Sans Khmer',
        'Poppins',
        sans-serif;

    font-size: 20px !important;
    font-weight: 700 !important;
    line-height: 1.5;
}

/* Room Type */
.room-type-badge {
    font-size: 11px !important;
    font-weight: 600;
}

/* Description */
.room-description {
    margin-top: 14px;

    color: #526f8e;

    font-size: 13px !important;
    font-weight: 400;
    line-height: 1.7;
}

/* Section Label */
.section-label {
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .7px;
}

/* Gallery and Equipment Titles */
.detail-section-header h2 {
    margin: 6px 0 3px;

    color: #12345a;

    font-family:
        'Poppins',
        'Noto Sans Khmer',
        sans-serif;

    font-size: 22px !important;
    font-weight: 800 !important;
}

/* Section Description */
.detail-section-header p {
    color: #71859e;

    font-size: 12px !important;
    line-height: 1.6;
}

/* Summary Number */
.summary-item strong {
    font-size: 20px !important;
    font-weight: 800 !important;
}

/* Summary Text */
.summary-item span {
    font-size: 10px !important;
    font-weight: 500;
}

/* Equipment Table */
.equipment-table {
    font-family:
        'Poppins',
        'Noto Sans Khmer',
        sans-serif;

    font-size: 12px;
}

.equipment-table th {
    font-size: 10px !important;
    font-weight: 800 !important;
}

.equipment-table td {
    font-size: 12px !important;
    font-weight: 500;
}

/* Inventory Total */
.inventory-total strong {
    font-size: 18px !important;
    font-weight: 800;
}

.inventory-total span {
    font-size: 10px !important;
}
@media (max-width: 600px) {
    .room-hero-info h1 {
        font-size: 27px !important;
    }

    .room-hero-info h2 {
        font-size: 17px !important;
    }

    .detail-section-header h2 {
        font-size: 19px !important;
    }

    .room-description {
        font-size: 12px !important;
    }

    .equipment-table {
        font-size: 10px;
    }

    .equipment-table td {
        font-size: 10px !important;
    }
}

/* Section label */
.detail-section .section-label {
    font-size: 12px !important;
    font-weight: 800 !important;
    letter-spacing: .8px;
}

/* Photo Gallery / Equipment & Facilities */
.detail-section-header h2 {
    margin: 8px 0 6px;

    font-size: 28px !important;
    font-weight: 800 !important;
    line-height: 1.35;
}

/* Description below title */
.detail-section-header p {
    font-size: 15px !important;
    line-height: 1.7;
}

/* Equipment table headings */
.equipment-table th {
    font-size: 13px !important;
    font-weight: 800 !important;
}

/* Equipment table content */
.equipment-table td {
    font-size: 15px !important;
    font-weight: 500;
}

/* Equipment name */
.equipment-table td strong,
.equipment-table .equipment-name {
    font-size: 16px !important;
    font-weight: 700 !important;
}

/* Quantity and condition */
.equipment-table .quantity,
.equipment-table .condition {
    font-size: 14px !important;
    font-weight: 700;
}
@media (max-width: 600px) {
    .detail-section-header h2 {
        font-size: 22px !important;
    }

    .detail-section-header p {
        font-size: 13px !important;
    }

    .equipment-table th {
        font-size: 10px !important;
    }

    .equipment-table td {
        font-size: 12px !important;
    }
}

/* ឱ្យ Header នៃ Section ទាំងអស់ចាប់ផ្ដើមពីជួរដូចគ្នា */
.detail-section-header {
    width: 100%;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* ឱ្យ ROOM PHOTOS និង ROOM INVENTORY ស្មើគ្នា */
.detail-section-header > div:first-child {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Label, Title និង Description នៅជួរតែមួយ */
.detail-section-header .section-label,
.detail-section-header h2,
.detail-section-header p {
    margin-left: 0 !important;
}
.detail-section {
    padding-left: 28px !important;
    padding-right: 28px !important;
}

.detail-section-header {
    padding-left: 0 !important;
}
@media (max-width: 600px) {
    .detail-section {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }
}

/* Align all section text to the same left line */
.room-detail-page .detail-section {
    padding-left: 26px !important;
    padding-right: 26px !important;
}

.room-detail-page .detail-section-header {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.room-detail-page .detail-section-header > div:first-child {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.room-detail-page .section-label,
.room-detail-page .detail-section-header h2,
.room-detail-page .detail-section-header p {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* English font សម្រាប់ព័ត៌មាន Room ទាំងអស់ */
html body .room-detail-page,
html body .room-detail-page *:not(i):not(svg):not(svg *):not(
    .fa, .fas, .far, .fab,
    .fa-solid, .fa-regular, .fa-brands
) {
    font-family: Georgia, "Times New Roman",
        "Battambang", "Khmer OS Battambang", serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    letter-spacing: normal !important;
    font-variant-numeric: lining-nums;
}