﻿@charset "utf-8";

/* =========================================================
   LightMapShow
   參考 RecentReportList：條件區自然高度，地圖固定高度
   不干擾 Leaflet / DevExpress ComboBox 行為
   ========================================================= */

html,
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* =========================================================
   Page
   ========================================================= */

.fe-report-map-page {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 82px !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    padding-bottom: 18px !important;
}

/* =========================================================
   Search Card
   ========================================================= */

.fe-search-card {
    margin-bottom: 12px !important;
    padding: 14px 16px 12px !important;
    border: 1px solid rgba(185, 202, 219, .95);
    border-radius: 18px;
    background: radial-gradient(circle at top right, rgba(245, 200, 91, .18), transparent 34%), linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, .13);
}

    .fe-search-card .mb-3 {
        margin-bottom: 8px !important;
    }

.fe-search-title {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #0B1D33;
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: .02em;
    line-height: 1.2;
}

    .fe-search-title i {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        color: #111827;
        background: linear-gradient(135deg, #F5C85B, #D99A2B);
        box-shadow: 0 8px 18px rgba(217, 154, 43, .25);
    }

.fe-search-desc {
    margin-top: 5px;
    color: #64748B;
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.4;
}

.fe-combo-shell {
    width: 100%;
}

    /* ===============================
   前台路燈搜尋 ComboBox
   =============================== */

    .fe-combo-shell .form-control,
    .fe-combo-shell input,
    .fe-combo-shell .dxeEditArea,
    .fe-combo-shell .dxbs-edit-input {
        font-size: 1.15rem !important;
        font-weight: 700;
        line-height: 1.5 !important;
    }

    .fe-combo-shell .form-control,
    .fe-combo-shell .dxbs-edit {
        min-height: 46px;
    }

/* =========================================================
   Button
   ========================================================= */

.fe-action-buttons {
    display: block;
    width: 100%;
}

.fe-btn {
    width: 100% !important;
    min-height: 45px !important;
    border: 0 !important;
    border-radius: 12px !important;
    font-size: .96rem !important;
    font-weight: 850 !important;
    letter-spacing: .02em;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .13);
    transition: all .15s ease;
}

    .fe-btn:hover {
        transform: translateY(-1px);
    }

    .fe-btn i,
    .fe-btn .fa,
    .fe-btn .fas,
    .fe-btn .fa-solid {
        margin-right: 6px;
    }

.fe-btn-primary {
    background: linear-gradient(135deg, #F5C85B, #D99A2B) !important;
    color: #111827 !important;
    border: 0 !important;
}

    .fe-btn-primary:hover,
    .fe-btn-primary:focus {
        background: linear-gradient(135deg, #F8D46E, #D99A2B) !important;
        color: #111827 !important;
    }

/* =========================================================
   Map Card
   ========================================================= */

.map-card {
    padding: 10px !important;
    border: 1px solid rgba(185, 202, 219, .95);
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .13);
    overflow: visible;
}

.map-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px !important;
}

.map-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0B1D33;
    font-weight: 900;
    font-size: 1.05rem;
}

    .map-card-title i {
        color: #D99A2B;
    }

.map-card-subtitle {
    color: #64748B;
    font-size: .88rem;
    font-weight: 700;
}

/* 關鍵：桌機地圖固定高度，不用 flex / 100dvh */
#map {
    width: 100% !important;
    height: 560px !important;
    min-height: 560px !important;
    border-radius: 16px;
    overflow: hidden;
    background: #F8FAFC;
    border: 1px solid #B8CADB;
}

.map-border {
    border: 1px solid #B8CADB;
}

.map-hint {
    position: absolute;
    z-index: 999;
    margin: 10px 0 0 10px;
    background: rgba(255, 255, 255, .94);
    color: #334155;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: .88rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
    pointer-events: none;
}

/* =========================================================
   Marker Label
   ========================================================= */

.labelstyle {
    background: rgba(255, 255, 255, .9);
    border: 1px solid rgba(15, 23, 42, .2);
    color: #0F172A;
    font-weight: 900;
    border-radius: 999px;
    padding: 2px 6px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, .18);
}

/* =========================================================
   Leaflet Popup
   ========================================================= */

.leaflet-popup-content-wrapper {
    border-radius: 14px;
}

.leaflet-popup-content {
    margin: 8px 10px !important;
}

#iw-container {
    min-width: 250px;
    max-width: 300px;
    font-family: "Microsoft JhengHei", "微軟正黑體", sans-serif;
}

.iw-title {
    display: block;
    margin: 0 0 10px 0 !important;
    padding: 10px 36px 10px 14px !important;
    border-radius: 10px 10px 0 0;
    background: #EFF6FF !important;
    border: 1px solid #BFDBFE;
    color: #1E3A8A !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    line-height: 1.35 !important;
    box-sizing: border-box;
}

.iw-content {
    color: #334155 !important;
    font-size: .96rem !important;
    font-weight: 700 !important;
    line-height: 1.45 !important;
}

.iw-lightno {
    margin-bottom: 8px !important;
    color: #0F172A !important;
    font-size: 1.05rem !important;
    font-weight: 900 !important;
}

.iw-lightno-val {
    color: #B45309 !important;
    font-size: 1.08rem !important;
    font-weight: 900 !important;
}

.iw-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 8px 0;
}

.iw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 0;
    border-radius: 10px;
    padding: 7px 8px;
    font-size: .92rem;
    font-weight: 900;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.iw-btn-street {
    background: #E0F2FE;
    color: #075985;
}

.iw-btn-nav {
    background: #DCFCE7;
    color: #166534;
}

/* =========================================================
   Popup：按我回報路燈問題按鈕
   風格改為沉穩藍綠，避免太亮
   ========================================================= */

.iw-report-wrap {
    margin-top: 12px;
    text-align: center;
}


.iw-btn-report {
    position: relative;
    overflow: hidden;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 42px;
    padding: 10px 14px !important;
    border: 0 !important;
    border-radius: 999px !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #92400e 0%, #b45309 52%, #d97706 100%) !important;
    color: #ffffff !important;
    font-size: .96rem !important;
    font-weight: 850 !important;
    letter-spacing: .025em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .22);
    box-shadow: 0 9px 20px rgba(146, 64, 14, .24), 0 3px 8px rgba(15, 23, 42, .15);
    transform: translateY(0);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

    /* 光條 */
    .iw-btn-report::before {
        content: "";
        position: absolute;
        top: -40%;
        left: -80%;
        width: 45%;
        height: 180%;
        pointer-events: none;
        background: linear-gradient( 120deg, transparent 0%, rgba(255, 255, 255, .08) 35%, rgba(255, 255, 255, .55) 50%, rgba(255, 255, 255, .08) 65%, transparent 100% );
        transform: skewX(-22deg);
        opacity: 0;
    }

    /* hover 時光條慢慢掃過 */
    .iw-btn-report:hover::before,
    .iw-btn-report:focus::before {
        opacity: 1;
        animation: iwReportShine 1.45s ease-in-out infinite;
    }

    .iw-btn-report span {
        position: relative;
        z-index: 1;
    }

@keyframes iwReportShine {
    0% {
        left: -80%;
    }

    55% {
        left: 125%;
    }

    100% {
        left: 125%;
    }
}

.iw-btn-report:hover,
.iw-btn-report:focus {
    color: #ffffff !important;
    filter: brightness(1.03) saturate(1.03);
    transform: translateY(-1px);
    box-shadow: 0 13px 26px rgba(146, 64, 14, .30), 0 5px 12px rgba(15, 23, 42, .18);
}

.iw-btn-report:active {
    transform: translateY(0);
    filter: brightness(.98);
    box-shadow: 0 6px 14px rgba(146, 64, 14, .22), 0 2px 6px rgba(15, 23, 42, .14);
}

.iw-btn-report i,
.iw-btn-report .fa-solid {
    position: relative;
    z-index: 1;
    font-size: .95rem;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .16));
}

/* 文字也要壓在光條上方 */
.iw-btn-report {
    z-index: 0;
}

.marker-popup-normal {
    margin-top: 4px;
    color: #166534;
    font-size: .95rem;
    font-weight: 900;
}

.marker-popup-work {
    margin-top: 4px;
    color: #1D4ED8;
    font-size: .95rem;
    font-weight: 900;
}

.marker-popup-broken {
    margin-top: 4px;
    color: #B91C1C;
    font-size: .95rem;
    font-weight: 900;
}

.marker-popup-location {
    margin-top: 4px;
    color: #475569;
    font-size: .95rem;
    font-weight: 700;
}

.leaflet-container a.leaflet-popup-close-button {
    color: #1E3A8A !important;
    opacity: 1 !important;
    font-weight: 700;
}

    .leaflet-container a.leaflet-popup-close-button:hover {
        color: #0F172A !important;
        opacity: 1 !important;
    }

/* =========================================================
   Leaflet Control
   ========================================================= */

.leaflet-control-layers {
    border-radius: 10px !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .18) !important;
    border: 1px solid #DBE3EA !important;
    overflow: hidden;
}

.leaflet-control-layers-toggle {
    width: 38px !important;
    height: 38px !important;
    background-size: 22px 22px !important;
}

.leaflet-control-layers-expanded {
    padding: 10px 12px !important;
    font-size: 14px;
    line-height: 1.6;
    max-width: 230px;
}

/* =========================================================
   Fullscreen
   ========================================================= */

body.map-fullscreen-active .fe-action-buttons {
    display: none !important;
}

body.map-fullscreen-active .fe-report-map-page {
    padding-bottom: 0 !important;
}

body.map-fullscreen-active #map {
    height: 100dvh !important;
    min-height: 100dvh !important;
    border-radius: 0 !important;
}

body.map-fullscreen-active .map-card {
    padding: 0 !important;
    border-radius: 0 !important;
}

body.map-fullscreen-active .map-border {
    border-radius: 0 !important;
}

/* =========================================================
   Mobile
   參考 RecentReportList：手機地圖固定高度 390px
   ========================================================= */

@media (max-width: 768px) {
    html,
    body {
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .fe-report-map-page {
        padding-top: 72px !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
        padding-bottom: 14px !important;
    }

    .fe-search-card {
        padding: 12px 14px !important;
        margin-bottom: 10px !important;
        border-radius: 16px !important;
    }

        .fe-search-card .mb-3 {
            margin-bottom: 8px !important;
        }

    .fe-search-title {
        font-size: 1.05rem !important;
        line-height: 1.25 !important;
    }

        .fe-search-title i {
            width: 32px !important;
            height: 32px !important;
            flex: 0 0 32px !important;
            border-radius: 11px !important;
            font-size: .96rem !important;
        }

    .fe-search-desc {
        display: none !important;
    }

    .fe-action-buttons {
        position: static !important;
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin-top: 8px !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

        .fe-action-buttons .btn,
        .fe-action-buttons .dxbButton,
        .fe-action-buttons button {
            width: 100% !important;
        }

    .fe-btn {
        width: 100% !important;
        min-height: 46px !important;
        border-radius: 14px !important;
        font-size: 1rem !important;
    }

    .map-card {
        padding: 8px !important;
        border-radius: 16px !important;
    }

    .map-card-header {
        display: none !important;
    }

    /* 關鍵：手機固定高度，跟 RecentReportList 一樣 */
    #map {
        width: 100% !important;
        height: 500px !important;
        min-height: 390px !important;
        max-height: 500px !important;
        border-radius: 14px !important;
    }

    .map-hint {
        margin: 8px 0 0 8px !important;
        padding: 5px 10px !important;
        font-size: .8rem !important;
    }

    .leaflet-control-layers,
    .leaflet-control-zoom,
    .leaflet-control-fullscreen {
        transform: scale(.9);
        transform-origin: top right;
    }

    .leaflet-top.leaflet-right {
        top: 8px !important;
        right: 8px !important;
    }

    .leaflet-control-layers {
        max-width: 230px !important;
    }

    .leaflet-control-layers-expanded {
        max-width: 220px !important;
        font-size: 13px !important;
    }

    /* 手機 popup 內容過高時，popup 內捲動 */
    .leaflet-popup-content-wrapper {
        max-height: 340px !important;
        overflow: hidden !important;
        border-radius: 14px !important;
    }

    .leaflet-popup-content {
        max-height: 305px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        margin: 8px 9px !important;
        -webkit-overflow-scrolling: touch;
    }

    #iw-container {
        min-width: 220px !important;
        max-width: 260px !important;
    }

    .iw-title {
        padding: 8px 30px 8px 12px !important;
        font-size: .92rem !important;
        line-height: 1.3 !important;
        margin-bottom: 2px !important;
    }

    .iw-content {
        font-size: .88rem !important;
        line-height: 1.45 !important;
    }

    .iw-lightno {
        font-size: .96rem !important;
        margin-bottom: 2px !important;
    }

    .iw-lightno-val {
        font-size: 1rem !important;
    }

    .marker-popup-location,
    .marker-popup-normal,
    .marker-popup-work,
    .marker-popup-broken {
        font-size: .86rem !important;
        line-height: 1.35 !important;
        margin-top: 3px !important;
    }

    .iw-actions {
        gap: 5px !important;
        margin: 6px 0 !important;
    }

    .iw-btn {
        min-height: 34px !important;
        padding: 6px 6px !important;
        font-size: .82rem !important;
        border-radius: 8px !important;
    }

    .iw-report-wrap {
        margin-top: 8px !important;
    }

    .iw-btn-report {
        min-height: 40px !important;
        font-size: .9rem !important;
        border-radius: 999px !important;
    }
}

.iw-lightno {
    margin-top: 0 !important;
    margin-bottom: 3px !important;
    line-height: 1.25 !important;
}

@media (max-width: 768px) {
    .iw-lightno {
        margin-bottom: 2px !important;
        line-height: 1.22 !important;
    }
}

/* =========================================================
   民眾地圖頁：不知路燈編號報修按鈕
   ========================================================= */

.fe-action-buttons .fe-btn-primary,
.fe-action-buttons .fe-btn-primary.btn,
.fe-action-buttons .fe-btn-primary.btn-primary {
    min-height: 44px;
    padding: 10px 18px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #0f766e 0%, #0ea5a4 52%, #2563eb 100%) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    letter-spacing: .02em;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
    box-shadow: 0 10px 22px rgba(15, 118, 110, .24), 0 3px 8px rgba(15, 23, 42, .14);
    transform: translateY(0);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

    .fe-action-buttons .fe-btn-primary:hover,
    .fe-action-buttons .fe-btn-primary:focus {
        color: #ffffff !important;
        filter: brightness(1.05) saturate(1.05);
        transform: translateY(-2px);
        box-shadow: 0 15px 30px rgba(15, 118, 110, .32), 0 6px 14px rgba(15, 23, 42, .18);
    }

    .fe-action-buttons .fe-btn-primary:active {
        transform: translateY(0);
        filter: brightness(.98);
        box-shadow: 0 7px 16px rgba(15, 118, 110, .22), 0 2px 6px rgba(15, 23, 42, .14);
    }

    .fe-action-buttons .fe-btn-primary i,
    .fe-action-buttons .fe-btn-primary .fa-solid {
        margin-right: 7px;
        font-size: 1rem;
        filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18));
    }

    /* =========================================================
   不知路燈編號報修按鈕：Hover 光條掃過一次
   ========================================================= */

    .fe-action-buttons .fe-btn-primary,
    .fe-action-buttons .fe-btn-primary.btn,
    .fe-action-buttons .fe-btn-primary.btn-primary {
        position: relative;
        overflow: hidden;
    }

        /* 光條 */
        .fe-action-buttons .fe-btn-primary::before {
            content: "";
            position: absolute;
            top: -40%;
            left: -80%;
            width: 45%;
            height: 180%;
            pointer-events: none;
            background: linear-gradient( 120deg, transparent 0%, rgba(255, 255, 255, .08) 35%, rgba(255, 255, 255, .50) 50%, rgba(255, 255, 255, .08) 65%, transparent 100% );
            transform: skewX(-22deg);
            opacity: 0;
        }

        /* Hover / Focus 只掃一次 */
        .fe-action-buttons .fe-btn-primary:hover::before,
        .fe-action-buttons .fe-btn-primary:focus::before {
            opacity: 1;
            animation: feBtnPrimaryShine 1.8s ease-in-out infinite;
        }

@keyframes feBtnPrimaryShine {
    0% {
        left: -80%;
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    65% {
        left: 125%;
        opacity: 1;
    }

    100% {
        left: 125%;
        opacity: 0;
    }
}

/* =========================================================
   前台路燈搜尋 ComboBox 下拉：第一欄 LightNo 加大加粗
   ========================================================= */

.fe-combo-shell .dropdown-menu table tr td:first-child,
.fe-combo-shell .dxbs-listbox table tr td:first-child {
    font-size: 1.12rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    letter-spacing: .02em;
    white-space: nowrap;
}

