@font-face {
  font-family: 'IBMPlexSansThai';
  src: url('/fonts/IBM_Plex_Sans_Thai/IBMPlexSansThai-Thin.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
}
@font-face {
  font-family: 'IBMPlexSansThai';
  src: url('/fonts/IBM_Plex_Sans_Thai/IBMPlexSansThai-ExtraLight.ttf') format('truetype');
  font-weight: 200;
  font-style: normal;
}
@font-face {
  font-family: 'IBMPlexSansThai';
  src: url('/fonts/IBM_Plex_Sans_Thai/IBMPlexSansThai-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
}
@font-face {
  font-family: 'IBMPlexSansThai';
  src: url('/fonts/IBM_Plex_Sans_Thai/IBMPlexSansThai-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'IBMPlexSansThai';
  src: url('/fonts/IBM_Plex_Sans_Thai/IBMPlexSansThai-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: 'IBMPlexSansThai';
  src: url('/fonts/IBM_Plex_Sans_Thai/IBMPlexSansThai-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}
@font-face {
  font-family: 'IBMPlexSansThai';
  src: url('/fonts/IBM_Plex_Sans_Thai/IBMPlexSansThai-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

/* ใส่พื้นหลังแพทเทิร์นที่ body */
body {
    /* background-image: url(assets/images/background/5235.jpg); */
    background-size: cover;
    background-attachment: fixed;
    font-family: "IBMPlexSansThai", sans-serif;
    background-color: #f5f7fa;
    font-weight: 400;
    font-style: normal;
}

/* ทำให้ภาพพื้นหลังเป็นขาวดำและโปร่งจาง */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(https://pwacontact1662.pwa.co.th/pwa/complaints/assets/images/background/5235.jpg);
    background-size: contain;
    background-position: center;
    background-repeat: repeat-x;
    filter: grayscale(100%) opacity(0.1);
    z-index: -1;
    opacity: 0.5;
}

a{
    color: #333;
}

#pdpa{
    text-decoration: auto;
    font-weight: 500;
}

.pdpa-box {
  border: 1px solid #ced4da;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  background-color: #f8f9fa;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1rem;
}

.pdpa-box input[type="checkbox"] {
  margin-top: 0.2rem;
  transform: scale(1.4); /* ✅ ขยาย checkbox */
  accent-color: #0d6efd; /* ใช้สี primary ของ Bootstrap */
}

.pdpa-box label {
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
}

.container {
    max-width: 900px;
    margin-top: 40px;
}

#locationDiv{
    background-color: #edebe4;
    padding: 2px;
    text-align: center;
    font-size: .85rem;
    border-radius: 0 0 6px 6px;
}



.ss-main:focus {
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25) !important;
}

.card {
    border-radius: 12px;
    border: none;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
    background: white;
}



#search-container {
    position: relative;
    margin-bottom: 0px;
}

#suggest {
    position: absolute;
    top: 32px;
    left: 0;
    width: -webkit-fill-available; /* ✅ รองรับ Chrome, Safari */
    width: -moz-available; /* ✅ รองรับ Firefox */
    width: stretch; /* ✅ รองรับ Firefox รุ่นใหม่ */
    background: white;
    border: 1px solid #ccc;
    display: none;
    z-index: 1000;
    max-height: 150px;
    overflow-y: auto;
}

#suggest a {
    display: block;
    padding: 8px;
    text-decoration: none;
    color: black;
    cursor: pointer;
}

#suggest a:hover {
    background: #f1f1f1;
}

.suggest-input,.suggest-input:hover,.suggest-input:active{
    width: -webkit-fill-available; /* ✅ รองรับ Chrome, Safari */
    width: -moz-available; /* ✅ รองรับ Firefox */
    width: stretch; /* ✅ รองรับ Firefox รุ่นใหม่ */
    border-radius: 6px 6px 0 0;
    border-top: 1px solid #cccccc;
    border-left: 1px solid #cccccc;
    border-right: 1px solid #cccccc;
    border-bottom: 0;
    padding: 6px;
}

.suggest-input:focus{
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}


/* .form-control,
        .form-select {
            border-radius: 8px;
        } */

.btn-submit {
    border: 1px solid #000;
    border-radius: 8px;
    padding: 8px;
    font-size: 18px;
    color: #000;
    transition: all 0.3s ease-in-out;
}

.btn-submit:hover {
    background: #313131;
    color: white;
}

.pwa-info-box {
    position: relative;
    background: linear-gradient(to bottom, #0da0f4, #03468a);
    color: white;
    border-radius: 12px;
    padding: 20px;
    overflow: hidden;
    text-align: center;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.pwa-info-box::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("assets/images/background/bg-pwa.png");
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
    z-index: 0;
}

/* ปรับให้เนื้อหาอยู่ด้านหน้า */
.pwa-info-box > * {
    position: relative;
    z-index: 1;
    font-size: 1rem;
}

.pwa-info-box h2 {
    font-size: 1.8rem;
    margin-top: auto;
}

.pwa-info-box h5 {
    font-size: 1.5rem;
}

h4 small {
    font-size: 0.7em;
    color: #ff5353;
    font-weight: 400;
}

.pwa-info-box a {
    color: #ffffff;
    text-decoration: none;
    text-align: left;
}

.pwa-info-box a:hover {
    color: #fff;
}

.pwa-info-box-logo {
    max-width: 150px;
}

/* ปรับ h2 ให้ชิดด้านล่าง */
.pwa-info-box .contact-section {
    margin-top: auto;
    /* ดันให้ไปอยู่ล่างสุด */
    text-align: center;
}

/* ปรับไอคอนโซเชียลให้เว้นระยะเท่ากัน */
.pwa-info-box .social-icons {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 10px;
}

.social-icons a {
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    transition: 0.3s;
    width: 40px;
    height: 40px;
    text-align: center;
    border-radius: 50%;
    padding: 5px;
    background-color: #517eba;
}

.social-icons a:hover {
    color: #1c478a;
    background-color: #d2e5ff;
}

#map {
    height: 300px;
}

.ldmap_notice {
    display: none !important;
}

/*** ส่วนของการดูแลรูปพลีวิว ***/
.preview-container {
    display: flex;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 10px;
    justify-items: center;
}

.pwa-box-form {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* ปรับขนาดสำหรับอุปกรณ์ที่มีจอเล็ก */
@media (max-width: 768px) {
    .preview-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        /* มือถือ: 2 คอลัมน์ต่อแถว */
    }

    .pwa-box-form {
        padding-top: 0rem;
        padding-bottom: 1rem;
    }

    /* ปรับ h2 ให้ชิดด้านล่าง */
    .pwa-info-box .contact-section {
        margin-top: 20px;
        /* ดันให้ไปอยู่ล่างสุด */
        text-align: center;
    }

    .h4,
    h4 {
        font-size: calc(1rem + 0.3vw);
    }

    h4 small {
        display: none;
    }

    .pwa-info-box h5 {
        font-size: 1.25rem;
    }

    .pwa-info-box h2 {
        font-size: 1.425rem;
        margin-top: auto;
    }

    .social-icons a {
        line-height: 35px;
    }
}


.ss-main{
    padding: .375rem .75rem !important;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
}
/* การ์ดแต่ละไฟล์ */
.preview-item{
    position: relative;
    /* ไม่ต้องใช้ fill-available/available แล้ว เพื่อไม่ให้การ์ดยืดเต็มแถว */
    width: 130px;           /* ขนาดการ์ด */
    max-width: 44vw;
    height: auto;           /* สูงตามเนื้อหา */
    overflow: visible;      /* เผื่อปุ่มปิด */
    border-radius: 8px;
    background: transparent;
    display: flex;          /* วางเป็นคอลัมน์: รูป/วิดีโอ + ชื่อ */
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }
  
  /* รูป/วิดีโอในการ์ด */
  .preview-item img,
  .preview-item video{
    width: 100%;
    height: 100px;          /* ความสูง thumbnail */
    object-fit: cover;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    display: block;
  }
  
  /* ปุ่มลบ มุมขวาบน */
  .remove-btn{
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(220, 53, 69, .95);
    color: #fff;
    border: 1px solid #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 5;             /* กัน media ทับ */
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
  }
  .remove-btn:hover{ background: rgb(255 86 86 / 90%); }
  
  /* ชื่อไฟล์ใต้รูป + ตัด ... เมื่อยาวเกิน */
  .preview-name{
    display: block;
    width: 100%;
    margin-top: .35rem;
    padding: 0 .25rem;
    text-align: center;
    font-size: .75rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  

/*** ส่วนของการดูแลรูปพลีวิว ***/

@media screen and (max-width: 1600.98px) {
    .pwa-info-box {
        text-align: center;
    }
}

@media screen and (max-width: 1440.98px) {
    .pwa-info-box {
        text-align: center;
    }
}

@media screen and (max-width: 1024.98px) {
    .pwa-info-box {
        text-align: center;
    }
}

@media screen and (max-width: 991.98px) {
    .pwa-info-box {
        text-align: center;
    }
}

@media screen and (max-width: 768.98px) {
    .pwa-info-box {
        text-align: center;
    }
}

@media screen and (max-width: 425.98px) {
    .pwa-info-box {
        text-align: center;
        padding: 8px;
    }

    .pwa-info-box-logo {
        max-width: 120px;
    }

    .list-unstyled {
        margin-bottom: 0px;
    }

    .list-unstyled li {
        margin-top: 5px !important;
    }

    form div {
        /* margin-top: 6px !important; */
    }
}

@media screen and (max-width: 375.98px) {
    .pwa-info-box {
        text-align: center;
    }

    .pwa-info-box-logo {
        max-width: 100px;
    }
}
