
:root {
    --colortx: #008080;
    --colortxbr: #00A8A8; /* กำหนดตัวแปรสี */

    --colortx-rd:#008080;
    --colortx-bk:#01364d3d;
}
body {
    font-family: 'Inter', 'Noto Sans Thai', sans-serif;
    font-size: 15px;
    color: var(--colortx);
    
}
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media print {
    .no-print {
        display: none;
    }
}

.scrollable-row {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;

    .cardbar {
        flex: 0 0 auto;
        margin-right: 10px;
        background-image: url('../images/icon/map.png'); /* ระบุที่อยู่ไฟล์ภาพ */
        background-size: cover; /* ทำให้ภาพคลุมพื้นที่ทั้งหมด */
        background-position: center; 
        height: 159px;
        position: relative; 
      
    }

    .btn-group-bottom {
        position: absolute;
        bottom: 10px; /* ระยะห่างจากด้านล่าง */
        right: 10px; /* ระยะห่างจากด้านขวา */
    }

    .btn-outline-rd {
        color: var(--colortx-rd);
        background-color: #fff;
    }

    .btn-outline-rd:hover {
        background-color: var(--colortx-rd);
        color: #fff;
    }
}

a {
    text-decoration: none;
    color: var(--colortx);
}
.nav-link:active {
    color: var(--colortx);
}
.color-text-active{
    color: var(--colortx);
    background-color: #fff;
    border-radius: 29px;
}
.color-text{
    color: var(--colortx);
    background-color: #fff;
}
.color-text-border{
    color: #fff;
    background-color:var(--colortx) ;
    border-radius: 3px; 
}
.color-bg{
    background-color: var(--colortx);
    color: #fff;
}
.color-bg:hover{
    border-top: 1px solid var(--colortx);
}
.color-bg-r{
    background-color: var(--colortx-rd);
    color: #fff;
}

.dropdown-menu{
    font-size: 12px;
}

.dataTables_wrapper {
    color: #fff; /* สีข้อความ */
    font-size: 11px; /* ขนาดข้อความ */
}
.dt-bootstrap4 {
    color: #fff; /* สีข้อความ */
    font-size: 11px; /* ขนาดข้อความ */
}
.no-footer {
    color: #fff; /* สีข้อความ */
    font-size: 11px; /* ขนาดข้อความ */
}
.btn-group.flex-wrap .btn {
    color: #fff; /* สีข้อความ */
    font-size: 11px; /* ขนาดข้อความ */
    border: 0px;
    background-color: var(--colortx); /* สีพื้นหลังปุ่ม */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    
}
th, td {
    padding: 12px;
    border-bottom: 1px solid var(--colortx);
    text-align: left;
    
}
th {
    background-color: #f4f4f4;
}
tr:hover {
    background-color: #f1f1f1;
}
td input{
    width: 100%;
}
.responsive-element {
    width: 35%;
}
@media (min-width: 650px) {

  
} 

@media (max-width: 650px) {
    .responsive-element {
        width: 100%;
    }

    .custom-table-wrapper table,
    .custom-table-wrapper thead,
    .custom-table-wrapper tbody,
    .custom-table-wrapper th,
    .custom-table-wrapper td,
    .custom-table-wrapper tr {
        display: block;
    }
    
    .custom-table-wrapper thead tr {
        display: none;
    }
    
    .custom-table-wrapper tr {
        margin-bottom: 10px;
        border: 1px solid var(--colortx-rd);
        background-color: #fff;
        border-radius: 15px; /* Rounded corners 
        box-shadow: 0.5px 1px 2px var(--colortx-rd);*/
    }
    
    .custom-table-wrapper tr:hover {
        background-color: #fff;
    }
    
    .custom-table-wrapper td {
        text-align: left;
        border: 0;
        position: relative;
        border-radius: 15px;
    }
    
    .custom-table-wrapper td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 50%;
        padding-left: 10px;
        font-weight: bold;
        text-align: left;
    }
    
  
    .custom-table-wrapper td input { 
        text-align: right;
    }
    
    .custom-table-wrapper td:nth-child(5),
    .custom-table-wrapper td:nth-child(1) {
        border-bottom: 1px solid var(--colortx-rd);
        border-radius: 15px 15px 0 0;
    }
    
    .custom-table-wrapper tr:hover td:nth-child(6) {
        border-radius: 0 0 15px 15px;
    }
    
    .custom-table-wrapper tr:hover td:nth-child(6) a {
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
        text-align: center;
        line-height: inherit;
    }
    
    .custom-table-wrapper tr:hover td:nth-child(6) ul a {
        color: var(--colortx);
    }
    
    .custom-table-wrapper tr:hover td:nth-child(6) ul {
        width: 95%;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
        z-index: 82;
    }
    
    .custom-table-wrapper tr:hover td:nth-child(6) input {
        font-size: 16px;
        background-color: var(--colortx);
        color: #fff;
    }
    
    .custom-table-wrapper tr td:nth-child(6) input {
        font-size: 16px;
    }       
}

/* กำหนดสไตล์ให้กับขั้นตอนต่างๆ */
.step-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.step {
    position: relative;
    flex: 1 1 calc(20% - 20px);  /* ขนาดแต่ละขั้นตอน */
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.step-number {
    font-size: 24px;
    font-weight: bold;
    color: var(--colortx);
    margin-bottom: 10px;
}

.step-title {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* การจัดการเมื่อขั้นตอนถูกเลือก (hover หรือ active state) */
.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* เมื่อกำหนดให้ขั้นตอนใดถูกเลือก (active) */
.step.active {
    background-color: var(--colortx);
    color: white;
}

.step.active .step-number {
    color: white;
}

/* Responsive: เมื่อหน้าจอขนาดเล็กกว่า 768px (Mobile-first design) */
@media (max-width: 768px) {
    .step-container {
        flex-direction: column;
    }

    .step {
        flex: 1 1 100%;
        margin-bottom: 15px;
    }

    .step-number {
        font-size: 20px;
    }

    .step-title {
        font-size: 14px;
    }
}


/* Timeline Container */
.timeline {
    position: relative;
    margin: 20px 0;
    padding: 10px 0;
}

/* Timeline Item */
.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    position: relative;
}

/* Icon */
.timeline-icon {
    width: 25px;
    height: 25px;
    background-color:var(--colortx);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

/* Content */
.timeline-content {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

/* Title */
.timeline-title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--colortx);
}

/* Text */
.timeline-text {
    margin-top: 5px;
    color: #555;
}

/* Remark */
.timeline-remark {
    margin-top: 5px;
    color: #888;
    font-style: italic;
}

.swal2-custom-popup {
    border-radius: 2.5rem; /* กรอบโค้งมน */
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5); /* เงา */
    padding: 1.0rem;
    font-size: 1rem;
    background-color: #fff;
}

.swal2-icon-custom {
    border-color: #ffc107;
    color: #ffc107;
}
.custom-btn-50 {
    width: 50% !important;
    min-width: 100px; /* เพื่อให้ดูสวยในหน้าจอเล็ก */
}
.custom-btn-20 {
    width: 15% !important;
    min-width: 100px;
    float: left; /* หรือใช้ Bootstrap: float-start */
}
.swal2-actions {
    width: 100% !important;
    gap: 0.5rem;
}
