/* ==========================================================================
   1. FONTS & GLOBAL RESETS
   ========================================================================== */
/* 
 * OFFLINE FONTS:
 * Place font files in 'web/fonts/' folder.
 */
@font-face {
  font-family: "Sarabun";
  src: url("../fonts/Sarabun-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Kanit";
  src: url("../fonts/Kanit-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "K2D";
  src: url("../fonts/K2D-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Pridi";
  src: url("../fonts/Pridi-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Noto Sans Thai";
  src: url("../fonts/NotoSansThai-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

html,
body {
  height: 100%;
  font-family: "Sarabun", "Pridi", "Noto Sans Thai", sans-serif;
  }

/* Link Resets */
a:link,
a:visited,
a:hover,
a:active {
  text-decoration: none !important;
}

/* ==========================================================================
   2. LAYOUT & CONTAINER
   ========================================================================== */
.wrap {
  min-height: 100%;
  height: auto;
  margin: 0 auto -60px;
  padding: 0 0 60px;
}

.wrap>.container {
  padding: 70px 15px 20px;
}

.footer {
  height: 60px;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
  padding-top: 20px;
}

.jumbotron {
  text-align: center;
  background-color: transparent;
}

.jumbotron .btn {
  font-size: 21px;
  padding: 14px 24px;
}

/* Background Images */
.slide-main {
  background-image: url("../img/bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.logo1 {
  background-image: url("../img/logo1.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.logo2 {
  background-image: url("../img/logo2.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.logo3 {
  background-image: url("../img/logo3.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.w-150 {
    width: 150px !important;
}

.w-200 {
    width: 200px !important;
}
/* ==========================================================================
   3. NAVIGATION
   ========================================================================== */
/* Alien logout button in navbar */
.nav li>form>button.logout {
  padding: 15px;
  border: none;
}

.nav>li>form>button.logout:focus,
.nav>li>form>button.logout:hover {
  text-decoration: none;
  outline: none;
}

@media (max-width: 767px) {
  .nav li>form>button.logout {
    display: block;
    text-align: left;
    width: 100%;
    padding: 10px 15px;
  }
}

/* ==========================================================================
   4. TABLES & GRIDS (GridView / DetailView)
   ========================================================================== */

/* Fixed column widths */
.detail-view th {
  width: 30%;
}

.detail-view td {
  width: 70%;
}

.grid-view th {
  white-space: nowrap;
}

/* Sort Icons */
a.asc:after,
a.desc:after {
  position: relative;
  top: 1px;
  display: inline-block;
  font-family: "Glyphicons Halflings";
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  padding-left: 5px;
}

a.asc:after {
  content: "\e151";
}

a.desc:after {
  content: "\e152";
}

.sort-numerical a.asc:after {
  content: "\e153";
}

.sort-numerical a.desc:after {
  content: "\e154";
}

.sort-ordinal a.asc:after {
  content: "\e155";
}

.sort-ordinal a.desc:after {
  content: "\e156";
}

/* Action Column Styles */
.action-column {
  white-space: nowrap !important;
  width: 75px !important;
  text-align: center;
}

.action-column a {
  margin-right: 2px !important;
  margin-left: 0 !important;
}

.action-column a:last-child {
  margin-right: 0 !important;
}

/* View Button (Blue) */
.action-column a:nth-of-type(1) {
  background-color: #0d6efd;
  border-color: #999;
  color: #222;
}

/* Update Button (Yellow) */
.action-column a:nth-of-type(2) {
  background-color: #ffc107;
  border-color: #999;
  color: #222;
}

/* Delete Button (Red) */
.action-column a:nth-of-type(3) {
  background-color: #dc3545;
  border-color: #999;
  color: #222;
}

/* Table Images */
td>img {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
}

/* ==========================================================================
   5. FORMS, ALERTS & HELPERS
   ========================================================================== */
.hint-block {
  display: block;
  margin-top: 5px;
  color: #999;
}

.error-summary {
  color: #a94442;
  background: #fdf7f7;
  border-left: 3px solid #eed3d7;
  padding: 10px 20px;
  margin: 0 0 15px 0;
}

.not-set {
  color: #c55;
  font-style: italic;
}

.alert {
  font-size: 0.5rem;
  color: #900 !important;
}

.alert-top {
  background-color: #ffc107;
  font-size: medium;
}

a .nav-link {
  color: #000 !important;
}

.nav-link:hover {
  color: #270089;
}
.w50{
    width: 50px;
}


.t10{
    font-size: 0.85rem !important;
} 

.t12{
    font-size: 1.2rem !important;
} 


.text-end{
    text-align: right !important;
}


/* form */

/* สำหรับ Bootstrap 4/5 (รุ่นใหม่) */
    .is-invalid {
        background-color: #f6fd29 !important; /* สีเหลืองอ่อน */
        border-color: #ff5252 !important;     /* ขอบสีแดง */
    }

    /* สำหรับ Bootstrap 3 (รุ่นเก่า) */
    .has-error .form-control {
        background-color: #fff9c4 !important;
        border-color: #a94442 !important;
    }
    
    /* เพิ่มเติม: เมื่อ Focus ที่ฟิลด์มีปัญหา */
    .form-control.is-invalid:focus {
        background-color: #fff176 !important; /* เหลืองเข้มขึ้นเล็กน้อยเมื่อกด */
        box-shadow: 0 0 0 0.2rem rgba(255, 235, 59, 0.25);
    }


    .card-header{
      padding: 0.9rem !important;
    }


/* ปรับความกว้างของ Modal เป็น 95% */
#map-modal .modal-dialog {
    max-width: 80% !important;
    width: 90% !important;
    margin: 1.75rem auto; /* จัดกึ่งกลาง */
}

/* ปรับความสูงของแผนที่ให้รับกับความกว้างที่เพิ่มขึ้น */
#google-map-picker {
    height: 500px !important; /* เพิ่มความสูงเพื่อให้เต็มตามากขึ้น */
    width: 100%;
}    

/* Fix Google Maps Autocomplete in Modal */
.pac-container {
    z-index: 1061 !important;
}

.t10{
    font-size: 0.7rem !important;
}

/*---------------modal----------------*/
#main-modal .modal-dialog {
        max-width: 95% !important;
        width: 95% !important;
    }

/* บังคับให้ modal-dialog อยู่กึ่งกลางหน้าจอ * /
    #main-modal.modal {
     /*   text-align: center;  
        padding: 0 !important;
    }

    #main-modal .modal-dialog {
        display: inline-block;
        vertical-align: middle;
        max-width: 95% !important;
        width: 95% !important;
        margin: 0 auto;
    }

    /* เทคนิค Pseudo-element เพื่อช่วยจัดกึ่งกลางแนวตั้ง * /
    #main-modal:before {
        content: '';
        display: inline-block;
        height: 100%;
        vertical-align: middle;
        margin-right: -4px;
    }
    */

/* ==========================================================================
   6. PRINT STYLES
   ========================================================================== */
@media print {
  * {
    font-family:   "Sarabun", sans-serif !important;
  }

  .d-print-none {
    display: none !important;
  }

  .table {
    width: 100%;
    border-collapse: collapse;
  }

  .table-bordered th,
  .table-bordered td {
    border: 1px solid #dee2e6 !important;
  }

  body {
    font-family: "Sarabun", sans-serif !important;
 
  }

  h2,
  h3,
  h4 {
    color: black !important;
  }
 
.t10{
    font-size: 0.70rem !important;
} 


.text-end{
    text-align: right !important;
}

}

/* Progress Bar Styles */
#progressbar {
    margin-bottom: 30px;
    overflow: visible; /* Changed from hidden to visible to prevent clipping */
    padding-left: 0;
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
#progressbar li {
    list-style-type: none;
    width: 33.33%;
    position: relative;
    text-align: center;
}
/* Icons */
.step-icon {
    width: 45px;
    height: 45px;
    line-height: 45px;
    border-radius: 50%;
    background: #e9ecef; /* Inactive background */
    color: #6c757d; /* Inactive icon color */
    font-size: 18px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2; /* Keep above connector */
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Prevent icon from squishing */
}
.step-text {
    color: #6c757d;
    font-weight: bold;
    font-size: 14px;
}

/* Connector Line */
#progressbar li:after {
    content: '';
    width: 100%;
    height: 4px;
    background: #e9ecef;
    position: absolute;
    left: -50%;
    top: 22.5px; /* Center of 45px circle */
    z-index: -1;
    transform: translateY(-50%);
}
#progressbar li:first-child:after {
    content: none;
}

/* Active State */
#progressbar li.active .step-icon {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    color: white;
    transform: scale(1.1); /* Slight pop effect */
    box-shadow: 0 6px 12px rgba(25, 135, 84, 0.3);
}
#progressbar li.active .step-text {
    color: #198754;
    font-weight: bold;
}
/* Active Connector (Completed steps lead to active) */
/* Note: Since we want the line leading TO the active step to be green, we target the active li's after */
#progressbar li.active:after {
    background: #198754;
}

/* Progress Bar Styles */
#progressbar {
    margin-bottom: 30px;
    overflow: visible; /* Changed from hidden to visible to prevent clipping */
    padding-left: 0;
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}
#progressbar li {
    list-style-type: none;
    width: 33.33%;
    position: relative;
    text-align: center;
}
/* Icons */
.step-icon {
    width: 45px;
    height: 45px;
    line-height: 45px;
    border-radius: 50%;
    background: #e9ecef; /* Inactive background */
    color: #6c757d; /* Inactive icon color */
    font-size: 18px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2; /* Keep above connector */
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex-shrink: 0; /* Prevent icon from squishing */
}
.step-text {
    color: #6c757d;
    font-weight: bold;
    font-size: 14px;
}

/* Connector Line */
#progressbar li:after {
    content: '';
    width: 100%;
    height: 4px;
    background: #e9ecef;
    position: absolute;
    left: -50%;
    top: 22.5px; /* Center of 45px circle */
    z-index: -1;
    transform: translateY(-50%);
}
#progressbar li:first-child:after {
    content: none;
}

/* Active State */
#progressbar li.active .step-icon {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    color: white;
    transform: scale(1.1); /* Slight pop effect */
    box-shadow: 0 6px 12px rgba(25, 135, 84, 0.3);
}
#progressbar li.active .step-text {
    color: #198754;
    font-weight: bold;
}
/* Active Connector (Completed steps lead to active) */
/* Note: Since we want the line leading TO the active step to be green, we target the active li's after */
#progressbar li.active:after {
    background: #198754;
}
 