/* นำเข้าฟอนต์จาก Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Sarabun&display=swap');

/* ใช้ฟอนต์นี้กับทั้งเว็บ หรือเฉพาะ class .thsarabun */
body, .thsarabun {
    font-family: 'Sarabun', sans-serif;
}


.app-sidebar .menu .menu-item .menu-submenu .menu-item .menu-link {
    padding-left: 65.004px;
    padding-right: 2px;
}

.app-header .navbar-brand {
    padding: 5px 5px;
}


.profile-header .profile-header-cover {
    background-image: url('google/images/profile-cover.jpg');
}

.profile-header .profile-header-cover::before {
    /*background: none !important;*/
    /*background: linear-gradient(to right, rgba(33, 33, 33, 0.9) 0%, rgba(33, 33, 33, 0) 50%, rgba(33, 33, 33, 0) 100%);*/
    background: linear-gradient(to right, rgba(2, 76, 0, 0.9) 0%, rgba(33, 33, 33, 0) 50%, rgba(33, 33, 33, 0) 100%);
}



/* CSS: โลโก้มีแสงวิ่งผ่าน */
.logo-glow {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.logo-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.8) 50%, rgba(255,255,255,0.2) 100%);
    transform: skewX(-20deg);
    animation: shine 2.5s infinite;
}

@keyframes shine {
    0% {
        left: -75%;
    }
    100% {
        left: 125%;
    }
}










@media (max-width: 768px) {
    .navbar-nav {
        background-color: #f8f9fa !important; /* Bootstrap bg-light */
    }
}


.app-header .navbar-form {
    padding: 0 0px;
}









.navbar-marquee {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.navbar-marquee-text {
    display: inline-block;
    padding-left: 100%;
    animation: navbar-scroll-left 30s linear infinite;
}

/* ปลายแหลมด้านซ้าย */
.navbar-marquee::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50px; /* ขนาดความยาวปลายแหลม */
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}

/* ปลายแหลมด้านขวา (ถ้าต้องการให้หายลับทางขวาด้วย) */
.navbar-marquee::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
}




@keyframes navbar-scroll-left {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}





@media (max-width: 1500px) {
    .app-header .navbar-form.custom-narrow-form {
        max-width: 700px !important;
    }
}

@media (max-width: 1400px) {
    .app-header .navbar-form.custom-narrow-form {
        max-width: 600px !important;
    }
}

@media (max-width: 1300px) {
    .app-header .navbar-form.custom-narrow-form {
        max-width: 500px !important;
    }
}

@media (max-width: 1200px) {
    .app-header .navbar-form.custom-narrow-form {
        max-width: 315px !important;
    }
}






/*#gritter-notice-wrapper {*/
/*    left: 20px !important;*/
/*    right: auto !important;*/
/*}*/



.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 1rem;
    border: 1px solid rgba(200, 200, 200, 0.4);
    transition: all 0.2s ease-in-out;
}





.jstree-anchor {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding-right: 0 !important;
    width: 100%;
}

.tree-title {
    display: flex;
    align-items: center;
    flex-shrink: 1;
    white-space: nowrap;
}

.tree-title i {
    margin-right: 0.5rem;
}

.action-buttons {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

.action-buttons button {
    font-size: 0.75rem;
    padding: 1px 6px;
}

#org-tree {
    font-size: 0.95rem;
}


/*!* ให้ row ทั้งแถวเป็น flex เพื่อจัดให้ inline *!*/
#org-tree li > i.jstree-ocl {
    position: absolute;
    left: -2px;
    top: 10px;
    transform: translateY(-50%);
    z-index: 1;
}

#org-tree .jstree-anchor {
    margin-left: 3px; /* เว้นที่ให้ ocl icon แสดง */
}

#org-tree .jstree-node {
    position: relative;
}








#address-tree {
    font-size: 0.95rem;
}


/*!* ให้ row ทั้งแถวเป็น flex เพื่อจัดให้ inline *!*/
#address-tree li > i.jstree-ocl {
    position: absolute;
    left: -2px;
    top: 10px;
    transform: translateY(-50%);
    z-index: 1;
}

#address-tree .jstree-anchor {
    margin-left: 6px; /* เว้นที่ให้ ocl icon แสดง */
}

#address-tree .jstree-node {
    position: relative;
}





.leaflet-popup-content, .leaflet-popup-tip {
    font-family: 'Sarabun', sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
}




.hover-card {
    transition: all 0.3s ease-in-out;
    border-radius: 0.25rem;
    /*background-color: #ffffff;*/
    /*border: 1px solid #dee2e6;*/
}

.hover-card:hover {
    background-color: #f8f9fa; /* พื้นหลังเทาอ่อน */
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.15); /* เงาใหญ่ขึ้น */
    cursor: pointer;
    transform: translateY(-3px) scale(1.01); /* ยกขึ้น + ขยายเล็กน้อย */
    border-color: #ced4da; /* เส้นขอบเข้มขึ้น */
}







.custom-group-list .list-group-item.active {
    background: linear-gradient(to right, #dcdcdc, #ffffff);

    color: #00741c;
    border-color: #127200;
    font-weight: 600;
    position: relative;
}

.custom-group-list .list-group-item.active button {
    background: #f1f1f1;
}

.custom-group-list .list-group-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: #ffc107;
    border-radius: 0 3px 3px 0;
}

.custom-group-list .list-group-item:not(.active):hover {
    background-color: #f8f9fa;
    cursor: pointer;
}











.empty-state{
    border: 1px dashed var(--bs-border-color);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.015));
}
.empty-state .empty-icon i.fa-circle{
    color: var(--bs-primary);
}



.filter-dot{
    display:inline-block;width:.55rem;height:.55rem;border-radius:50%;
    background: var(--bs-warning); box-shadow:0 0 0 2px #fff;
    vertical-align:middle; margin-left:.35rem;
}
