/* 门店查询页面专属样式 */

/* 地图背景图案 */
.bg-map-pattern {
    background-color: #e5e7eb;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.5) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.5) 2px, transparent 2px),
        linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
}

/* 主内容区 */
main {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 65px);
    overflow: hidden;
}

.mobile-search {
    display: none;
    padding: 16px;
    background-color: white;
    border-bottom: 1px solid #e2e8f0;
}

.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .material-symbols-outlined {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.search-input-wrapper input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
}

.search-input-wrapper input:focus {
    outline: 2px solid rgba(43, 140, 238, 0.5);
    outline-offset: 0;
}

.content-wrapper {
    display: flex;
    min-height: 800px;
    position: relative;
}

/* 侧边栏 */
aside {
    width: 450px;
    background-color: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    z-index: 10;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-header h1 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 16px;
}

.sidebar-header .search-input-wrapper {
    margin-bottom: 16px;
}

.sidebar-header .search-input-wrapper input {
    padding: 12px 16px 12px 40px;
    border-radius: 12px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    background-color: white;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: #2b8cee;
    color: #2b8cee;
}

.filter-btn.active {
    background-color: #2b8cee;
    color: white;
    border-color: #2b8cee;
}

/* 门店列表 */
.store-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.store-item {
    padding: 24px;
    cursor: pointer;
    transition: background-color 0.3s;
    border-left: 4px solid transparent;
    border-bottom: 1px solid #f1f5f9;
}

.store-item:hover {
    background-color: #f8fafc;
}

.store-item.active {
    border-left-color: #2b8cee;
    background-color: #f8fafc;
}

.store-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.store-name {
    font-weight: bold;
    font-size: 18px;
    color: #111418;
}

.status-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.open {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.closing {
    background-color: #ffedd5;
    color: #c2410c;
}

.status-badge.maintenance {
    background-color: #f3f4f6;
    color: #6b7280;
}

.store-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.tag.primary {
    background-color: #2b8cee;
    color: white;
}

.tag.secondary {
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.store-info {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.store-info .material-symbols-outlined {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.store-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.load-more {
    padding: 16px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
}

.load-more p {
    font-size: 12px;
    color: #94a3b8;
}

.load-more button {
    margin-top: 8px;
    color: #2b8cee;
    font-size: 14px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
}

.load-more button:hover {
    text-decoration: underline;
}

/* 地图区域 */
.map-container {
    position: relative;
    width: 100%;
    height: 850px;
}

.tianditu-map {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.store-info-window {
    font-family: 'Noto Sans SC', sans-serif;
}

.store-info-window .status-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.store-info-window .status-badge.open {
    background-color: #dcfce7;
    color: #166534;
}

.store-info-window .status-badge.closing {
    background-color: #ffedd5;
    color: #c2410c;
}

.store-info-window .status-badge.maintenance {
    background-color: #f3f4f6;
    color: #6b7280;
}

.info-window-tag {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    margin: 0 2px 2px 0;
    border-radius: 4px;
    background-color: #e2e8f0;
    color: #64748b;
}

.info-window-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.info-window-btn:hover {
    opacity: 0.9;
}

/* 天地图控件样式调整 */
.tdt-control-zoom {
    border: 1px solid #d2d6de !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.tdt-control-zoom a {
    background-color: white !important;
    color: #64748b !important;
    height: 40px !important;
    width: 40px !important;
    line-height: 40px !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tdt-control-zoom a:hover {
    background-color: #f8fafc !important;
}

.tdt-control-scale {
    background: rgba(255, 255, 255, 0.9) !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}

.tdt-control-maptype {
    border: 1px solid #d2d6de !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* 地图标记 */
.map-marker {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 10;
}

.map-marker:hover {
    z-index: 20;
}

.marker-popup {
    background-color: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 8px;
    text-align: center;
    white-space: nowrap;
    border: 1px solid #f1f5f9;
    position: relative;
}

.marker-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background-color: white;
    border-bottom: 1px solid #f1f5f9;
    border-right: 1px solid #f1f5f9;
}

.marker-popup p:first-child {
    font-weight: bold;
    font-size: 14px;
    color: #111418;
}

.marker-popup p:last-child {
    font-size: 12px;
    color: #2b8cee;
    font-weight: 500;
}

.marker-icon {
    width: 40px;
    height: 40px;
    background-color: #2b8cee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
    position: relative;
    z-index: 10;
}

.marker-icon .material-symbols-outlined {
    color: white;
    font-size: 20px;
}

.map-marker.active .marker-icon {
    animation: bounce 2s infinite;
}

.map-marker.active .marker-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background-color: #2b8cee;
    border-radius: 50%;
    opacity: 0.5;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.map-marker.inactive .marker-icon {
    background-color: #60a5fa;
    width: 32px;
    height: 32px;
}

.map-marker.inactive .marker-icon .material-symbols-outlined {
    font-size: 14px;
}

.map-marker.disabled {
    opacity: 0.75;
}

.map-marker.disabled .marker-icon {
    background-color: #9ca3af;
}

.map-marker .marker-popup {
    opacity: 0;
    transition: opacity 0.3s;
}

.map-marker:hover .marker-popup {
    opacity: 1;
}

.map-marker.active .marker-popup {
    opacity: 1;
}

/* 装饰元素 */
.map-decoration {
    pointer-events: none;
}

/* 动画效果 */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* 响应式设计 - 门店查询页面 */
@media (max-width: 768px) {
    .mobile-search {
        display: block;
    }

    .content-wrapper {
        flex-direction: column;
    }

    aside {
        width: 100%;
        max-height: 40vh;
        order: 2;
        border-right: none;
        box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
    }

    .sidebar-header {
        display: none;
    }

    .map-container {
        order: 1;
        height: 60vh !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    aside {
        width: 400px;
    }
}
