﻿body {
    font-family: 'Poppins', sans-serif;
    /* ใช้ฟอนต์ Poppins เป็นฟอนต์หลัก */
}

#map-container {
    position: relative;
    width: 70%;
    margin: auto;
}

#map {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.marker {
    position: absolute;
    width: 7px;
    height: 7px;
    background-color: rgb(251, 255, 0);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 0 10px 5px rgba(255, 0, 0, 0.5);
    /* เพิ่มเงาเริ่มต้น */
    animation: blink-shadow 1s infinite ease-in-out;
    /* ทำให้เงากระพริบ */
}

.marker:hover {
    width: 12px;
    height: 12px;
}

@keyframes blink-shadow {

    0%,
    100% {
        box-shadow: 0 0 0px 2px rgba(251, 255, 0, 0.5);
        /* เงาปกติ */
    }

    50% {
        box-shadow: 0 0 0px 5px rgba(255, 0, 0, 0);
        /* เงาจางหาย */
    }
}

.marker.type2 {
    width: 5px;
    height: 5px;
    background-color: rgb(255, 255, 255);
    border-radius: 50%;
    box-shadow: 0 0 0px 2px rgba(255, 255, 255, 0.5);
    /* เปลี่ยนสีเงาเป็นสีเขียว */
    animation: blink-blue 1.5s infinite ease-in-out;
}

.marker.type2:hover {
    width: 10px;
    height: 10px;
}

#controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: #111;
    width: 45%;
    /* สีพื้นหลังเบา */
    border: 1px solid #ddd;
    /* เส้นขอบบาง */
    border-radius: 10px;
    /* มุมโค้ง */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    /* เงา */
    font-family: 'Poppins', sans-serif;
    /* ฟอนต์ */
}

#controls label {
    font-size: 16px;
    font-weight: 600;
    color: #a3a3a3;
    /* สีตัวอักษร */
    margin-right: 10px;
}

#controls select {
    font-size: 14px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    /* ขอบ */
    border-radius: 5px;
    /* มุมโค้ง */
    background-color: #fff;
    /* พื้นหลัง */
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    /* เงาด้านใน */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    /* เอฟเฟกต์ */
    cursor: pointer;
}

#controls select:hover {
    border-color: #fff;
    /* สีขอบเมื่อ hover */
}

#controls select:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    /* เงาเมื่อโฟกัส */
}


/* Style for the Pop-up */
/* Style for the Pop-up */
#popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    /* สีพื้นหลัง */
    border-radius: 8px;
    /* มุมโค้ง */
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* เงารอบกล่อง */
    display: none;
    z-index: 1000;
    max-width: 500px;
    width: 90%;
    max-height: 80%;
    /* จำกัดความสูง */
    overflow-y: auto;
    /* ทำให้เลื่อนเนื้อหาได้ */
}

#popup::-webkit-scrollbar {
    width: 8px;
    /* ความกว้างของ Scrollbar */
}

#popup::-webkit-scrollbar-thumb {
    background: #4CAF50;
    /* สีของ Scrollbar */
    border-radius: 10px;
    /* มุมโค้งของ Scrollbar */
}

#popup::-webkit-scrollbar-thumb:hover {
    background: #45a049;
    /* สีเมื่อ Hover */
}


#popup h3 {
    margin: 0 0 15px;
    font-size: 20px;
    color: #333;
    /* สีของหัวข้อ */
    border-bottom: 2px solid #4CAF50;
    /* เส้นคั่นใต้หัวข้อ */
    padding-bottom: 5px;
}

#popup p {
    margin: 10px 0;
    color: #555;
    /* สีข้อความ */
    font-size: 16px;
    line-height: 1.5;
}

#popup ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style: disc;
    /* รูปแบบจุดแสดง */
}

#popup ul li {
    margin: 5px 0;
    color: #555;
    font-size: 16px;
}

/* ปุ่ม Close */
#popup button {
    background-color: #4CAF50;
    /* สีเขียว */
    color: white;
    /* สีตัวอักษร */
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    /* มุมโค้ง */
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
}

#popup button:hover {
    background-color: #45a049;
    /* สีเมื่อ hover */
}

/* Background overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    /* พื้นหลังโปร่งใส */
    display: none;
    z-index: 999;
}

#popup-title {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #4CAF50;
    margin-bottom: 10px;
    text-align: center;
}

#popup-info p {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.5;
    color: #555;
    /* สีข้อความ */
}

#popup-info ul {
    margin: 10px 0;
    padding-left: 20px;
    list-style: disc;
}

#popup-info ul li {
    margin: 5px 0;
    font-size: 16px;
    color: #555;
}

/* เพิ่มใน viewmap.css */

#popup {
    max-width: 400px;
    max-height: 500px;
    overflow-y: auto;
}

.mission-details {
    text-align: left;
}

.mission-details p {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mission-details i {
    color: #4CAF50;
    width: 16px;
}

.dropitem-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.dropitem-list {
    margin: 10px 0;
    padding-left: 20px;
    list-style: none;
}

.dropitem-list li {
    margin: 5px 0;
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropitem-list li i {
    color: #ff9800;
}

/* Scrollbar styling */
#popup::-webkit-scrollbar {
    width: 6px;
}

#popup::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#popup::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

#popup::-webkit-scrollbar-thumb:hover {
    background: #555;
}