﻿
@font-face {
    font-family: "WinTaungyi";
    src: local('WinTaungyi'), url('../font/WinTaungyi.ttf') format('truetype');
}
@font-face {
    font-family: "Pyidaungsu";
    src: local('Pyidaungsu'), url('../font/Pyidaungsu.ttf') format('truetype');
}

body {
    background: linear-gradient( 135deg, rgba(30, 60, 114, 0.82) 0%, rgba(42, 82, 152, 0.75) 50%, rgba(13, 27, 62, 0.88) 100% ),
        url("../img/mmregion/mmbg2.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column; /* အပေါ်အောက် အစီအစဉ်ဖြစ်အောင် ပြောင်းလဲခြင်း */
    min-height: 100vh; /* height: 100vh အစား min-height သုံးပေးရပါမယ် */
    width: 100vw;
    overflow-x: hidden;
}

/* ပင်မ Container */
.main-wrapper {
    display: flex;
    width: 100%;
    flex: 1; /* လက်ရှိနေရာလွတ်အားလုံးကို ယူပြီး Footer ကို အောက်ဆုံးရောက်အောင် တွန်းပို့ပေးပါတယ် */
    flex-direction: row;
    box-sizing: border-box;
    padding: 15px 15px 0px 0px;
}
/* --- Footer အသစ်အတွက် Styling --- */
.site-footer {
    width: 100%;
    text-align: right;
    padding: 0px 25px 5px 0px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #b0c4de;
    box-sizing: border-box;
}

    .site-footer .highlight {
        color: #ffd700; /* Developer နာမည်ကို ရွှေရောင်လင်းလင်းလေး ပေးထားခြင်း */
    }

/* ဘယ်ဘက်အခြမ်း ခေါင်းစဉ်ဧရိယာ */
.sidebar-title {
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

    .sidebar-title h1 {
        font-family: 'WinTaungyi' !important;
        font-size: 42px;
        line-height: 1.6;
        color: #ffd700;
        text-align: center;
        letter-spacing: 0.5px;
        animation: fadeInEffect 1s ease-out forwards;
    }

    .sidebar-title h2 {
        font-size: 16px;
        font-family: Arial, Helvetica, sans-serif;
        font-weight: 500;
        color: #c1c1c1;
        margin-top: -10px;
        width: 100%;
        text-align: center;
        animation: fadeInEffect 1s ease-out 0.3s forwards;
        opacity: 0;
    }

/* --- Search Box Styling --- */
.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 10px 0 25px 0;
    border-top: 1px solid #fff;
    padding-top: 20px;
    animation: fadeInEffect 1s ease-out 0.6s forwards;
    opacity: 0;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px; /* ဘယ်ဘက်မှာ icon ပြဖို့ space ချန်ထားတာပါ */
    font-family: 'Pyidaungsu', Arial, sans-serif;
    font-size: 15px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08); /* မှန်ကြည်ရောင် ပုံစံ */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px; /* လုံးဝန်းသော UI ပုံစံ */
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

    /* Input ကိုနှိပ်လိုက်တဲ့အခါ (Focus ဖြစ်တဲ့အချိန်) ပြောင်းမယ့်ပုံစံ */
    .search-input:focus {
        background: rgba(255, 255, 255, 0.15);
        border-color: #ffd700; /* ခေါင်းစဉ်ကဲ့သို့ ရွှေရောင်လိုင်းလေး လင်းလာပါမယ် */
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
    }

    /* စာရိုက်ခြင်းမရှိခင် ပြသမယ့် စာသားအရောင် */
    .search-input::placeholder {
        color: #b0c4de;
    }

.search-icon {
    position: absolute;
    right: 18px; /* Icon နေရာ အလယ်ကျအောင် အနည်းငယ် ရွှေ့ထားပါတယ် */
    top: 60%;
    transform: translateY(-50%);
    font-size: 16px; /* Icon အရွယ်အစား သတ်မှတ်ချက် */
    color:#000;
    cursor:pointer;
}
    .search-icon:hover {
        color: #ffd700;
    }

/* Input ကို Focus ဖြစ်တဲ့အခါ Icon အရောင် ရွှေရောင်ပြောင်းလဲစေရန် */
.search-input:focus {
    color: #ffd700;
}

/* ညာဘက်အခြမ်း SVG မြေပုံဧရိယာ (Box Shadow နှင့် Padding ထည့်သွင်းထားသည်) */
.map-container {
    width: 50%;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff; /* မြေပုံ Area ကို အဖြူရောင် သီးသန့်ခွဲထုတ်ခြင်း */
    padding: 10px; /* ပတ်ပတ်လည် padding တိုးမြှင့်ထားခြင်း */
    box-sizing: border-box;
    border-radius: 12px; /* ထောင့်များကို အနည်းငယ်ဝိုင်းစေခြင်း */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); /* လှပသော အရိပ် (Box Shadow) ထည့်သွင်းခြင်း */
    animation: mapScaleUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

svg {
    width: 100%;
    height: 100%;
    max-height: 90vh;
}

path {
    cursor: pointer;
    stroke: #000;
    stroke-width: 1.5;
    transition: all 0.3s ease;
}

    path:hover {
        opacity: 0.85;
    }

/* foreignObject ၏ အနားသတ်များ အပြည့်ပေါ်စေရန် */
foreignObject {
    overflow: visible !important;
}

.map-box {
    font-family: 'Pyidaungsu';
    font-size: 10px;
    font-weight: bold;
    color: #000;
    background-color: #ffffff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 1px 2px 5px rgba(0,0,0,0.15);
    padding: 5px;
    /* ပုံအပေါ်၊ စာအောက် Flexbox စနစ် */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px; /* ပုံနဲ့ စာသားကြား အကွာအဝေး */

    white-space: nowrap !important;
    width: max-content !important;
    cursor: pointer;
    user-select: none;
    width: 60px !important;
}

    /* Box ထဲက ပုံ (Image) အတွက် Size သတ်မှတ်ချက် */
    .map-box img {
        width: 60px;
    }

    .map-box:hover {
        background-color: #f5f5f5;
        box-shadow: 1px 2px 8px rgba(0,0,0,0.35);
    }

.label-line {
    stroke-width: 1;
    stroke: #000 !important;
    /*stroke-dasharray: 3, 3;*/
    pointer-events: none;
}

.region-pointer {
    opacity: 1;
}

@keyframes fadeInEffect {
    from {
        opacity: 0;
        transform: translateY(-10px); /* အပေါ်ကနေ အောက်ကို အနည်းငယ်ဆင်းပြီး fade ဖြစ်ချင်ရင် သုံးနိုင်ပါတယ် */
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes mapScaleUp {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Map Box လေးများ တွန့်ပြီး Pop-up ပုံစံ ပေါ်လာမည့်စနစ် */
@keyframes boxPopUp {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }

    70% {
        transform: scale(1.08); /* အနည်းငယ် ပိုကြီးသွားပြီးမှ ပုံမှန်ပြန်ဖြစ်သွားအောင်လို့ပါ */
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Media Query */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .main-wrapper {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }

    .sidebar-title {
        width: 100%;
        text-align: center;
        align-items: center;
        padding: 10px;
    }

        .sidebar-title h1 {
            font-size: 25px;
        }

        .sidebar-title h2 {
            font-size: 14px;
        }

    .map-container {
        width: 100%;
        height: 65vh;
        padding: 15px;
    }
}

@media (max-width: 500px) {
    body {
        overflow: auto;
    }

    .main-wrapper {
        flex-direction: column;
        height: auto;
        padding: 5px 5px 10px 5px;
        gap: 5px;
    }

    .sidebar-title {
        width: 100%;
        text-align: center;
        align-items: center;
        padding: 10px;
    }

        .sidebar-title h1 {
            font-size: 20px;
        }

        .sidebar-title h2 {
            font-size: 12px;
        }

    .map-container {
        width: 100%;
        height: 60vh;
    }

    svg {
        height: 50vh;
    }
}
/* Responsive Media Query */
@media (max-width: 400px) {
    body {
        overflow: auto;
    }

    .main-wrapper {
        flex-direction: column;
        height: auto;
        padding: 5px 5px 10px 5px;
        gap: 5px;
    }

    .sidebar-title {
        width: 100%;
        text-align: center;
        align-items: center;
        padding: 10px;
    }

        .sidebar-title h1 {
            font-size: 20px;
        }

        .sidebar-title h2 {
            font-size: 12px;
        }

    .map-container {
        width: 100%;
        height: 60vh;
    }

    svg {
        height: 50vh;
    }
}
