
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@100..900&display=swap');


:root {
        --primary-color: #b278b4;
        --secondary-color: #e1cfe1;
        --background-color: #fff;
        --card-color: #ffffff;
        --text-color: #374151;

        --super-color : #787ab4;
        --green-color : #78b494;
        --yellow-color : #b4b278;
    }

    body {
        background-color: var(--background-color);
        color: var(--text-color);
        /* font-family: 'Open Sans', sans-serif; */
        font-family: "Noto Sans Thai", sans-serif;
        font-size: 15px;
        line-height: 1.6;
    }

    .leaflet-container{
        font-family: "Noto Sans Thai", sans-serif;
    }

    .text-primary{
        color: var(--primary-color) !important;
    }

    .navbar-brand {
        font-weight: bold;
        color: var(--primary-color) !important;
    }

    #map {
        height: calc(100vh - 125px);
        width: 100%;
    }

    .mobile-top-nav {
        background-color: var(--primary-color);
        border-bottom: 2px solid var(--primary-color);
        position: sticky;
        top: 0;
        z-index: 1001;
    }

    .mobile-top-nav-inner {
        align-items: center;
        display: flex;
        justify-content: space-between;
        min-height: 48px;
    }

    .mobile-brand {
        display: inline-flex;
    }

    .mobile-search-toggle {
        align-items: center;
        background: rgba(255, 255, 255, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.28);
        border-radius: 999px;
        color: #fff;
        display: inline-flex;
        height: 40px;
        justify-content: center;
        width: 40px;
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--card-color);
        border-top: 2px solid var(--primary-color);
        z-index: 1000;
    }

    .nav-item {
        text-align: center;
        padding: 10px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .nav-item.active {
        background-color: var(--primary-color);
        color: white;
    }

    .nav-item:hover {
        background-color: var(--primary-color);
        color: white;
    }

    .device-marker {
        background: var(--primary-color);
        border: 3px solid var(--secondary-color);
        border-radius: 50%;
        width: 20px;
        height: 20px;
    }

    .loading {
        text-align: center;
        padding: 20px;
    }

    .error {
        color: #ef4444;
        text-align: center;
        padding: 20px;
    }

    .PetMarker{
        border-radius: 50%;
        border: 1px solid #fff;
        text-align: center;
    }
    .color_3{background-color: #eee;}
    .color_0{background-color: #2dce89;}
    .color_1{background-color: #ffd600;}
    .color_2{background-color: #f5365c;}
    .badge   { padding: 4px 8px; border-radius: 6px; font-size: 0.75rem; }

    .progress-bar-container {
    position: absolute;
    bottom: 90px;
    z-index: 999;
    width: 80%;
    left: 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
}

.progress-controls {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}

.drange {
    flex-grow: 1; /* Allows the slider to take up available space */
    margin-left: 8px;
    background: rgb(120, 122, 180, .5);
    border-radius: 5px;
    padding: 0 6px;
}

#history-slider {
    width: 100%;
    margin: 3px 0 0;
    -webkit-appearance: none;
    height: 8px;
    background: transparent;
    cursor: pointer;
}

#history-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.progress-labels {
    width: 100%;
    display: flex; /* Enable Flexbox */
    justify-content: space-between; /* Distribute items with space between them */
    font-size: 0.9rem;
    color: #555;
    font-weight: 500;
}

.heatmap-controls-container {
    position: absolute;
    bottom: 90px;
    left: 10%;
    z-index: 999;
    width: 80%;
    text-align: center;
}


/* Styling for the custom Leaflet search control */
.search-control {
    background: transparent !important;
    border: none !important;
    padding: 0;
    width: auto !important;
    height: auto !important;
}

.search-toggle-btn {
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}

.search-toggle-btn i {
    color: #333;
}

.search-container {
    margin-top: 5px; /* Spacing between button and search bar */
    width: 250px;
    background: #fff;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease-in-out; /* Smooth transition */
}

#search-box {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.4;
}

.search-results {
    list-style: none;
    padding: 0;
    margin-top: 5px;
    display: none;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 5px;
}

.search-results-item {
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.search-results-item:hover {
    background-color: #f1f1f1;
}

.search-results-item:last-child {
    border-bottom: none;
}

.search-results-item strong,
.search-results-item small {
    pointer-events: none;
}

.pet-search-panel {
    position: sticky;
    top: 72px;
    z-index: 5;
    background: var(--background-color);
    padding: 6px 0 12px;
    margin-bottom: 12px;
}

.pet-search-input {
    font-size: 16px;
}

.pet-empty-state {
    background: #fff;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    color: #6b7280;
    margin: 12px 0 24px;
    padding: 16px;
    text-align: center;
}

.pet-card-image {
    height: 100%;
    object-fit: contain;
    object-position: center top;
    width: 100%;
}

.pet-card {
    overflow: hidden;
}

.pet-card-media {
    align-items: center;
    background:
      radial-gradient(circle at top, rgba(225, 207, 225, 0.85), rgba(255, 255, 255, 0.95)),
      linear-gradient(180deg, #f8f5fb 0%, #ffffff 100%);
    display: flex;
    justify-content: center;
    min-height: 180px;
    padding: 14px;
}

.pet-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pet-card-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pet-card-title {
    font-size: 1.1rem;
}

.pet-card-meta {
    color: #6b7280;
    font-size: 0.85rem;
}

.mobile-about-card {
    max-width: 680px;
}

.mobile-about-stats {
    background: linear-gradient(135deg, rgba(225, 207, 225, 0.55), rgba(255, 255, 255, 0.98));
    border: 1px solid rgba(178, 120, 180, 0.16);
    border-radius: 18px;
    padding: 16px;
}

.mobile-about-stats-icon {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.mobile-collar-list,
.mobile-collar-guide {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-collar-item,
.mobile-guide-item {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.mobile-collar-label {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.mobile-guide-item {
    align-items: flex-start;
    justify-content: flex-start;
}

.mobile-about-card .card-body p {
    margin-bottom: 0.5rem;
}

.mobile-about-card .card-body ul li {
    margin-bottom: 0.4rem;
}

.mobile-about-card .card-body ul li i {
    margin-right: 6px;
}

@media (max-width: 576px) {
    .search-container {
        width: min(280px, calc(100vw - 32px));
        padding: 10px;
    }

    .search-toggle-btn {
        width: 44px;
        height: 44px;
    }

    .progress-bar-container,
    .heatmap-controls-container {
        left: 5%;
        width: 90%;
    }

    .pet-card-media {
        min-height: 150px;
    }
}
