body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

header .toolbar {
    display: flex !important;
}

.content-container {
    margin-top: 72px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;    
}

@media (min-width: 540px) {
    .content-container {
        flex-direction: row;
        gap: 4px;
        align-items: flex-start;
        width: 100%;
        height: 100%;
        max-width: 1024px;
    }
    .preview-container {
        min-width: 240px;
        min-height: 240px;
    }
    .search-container {
        max-height: calc(100dvh - 240px);
    }
}

@media (max-width: 539px){
    .content-container{
        max-width: 450px;
    }
    .search-container{
        padding: 0;
    }
    .icon-button.fab {
        position: fixed;
        top: calc(100dvh - 72px);
        right: 16px;
        z-index: 1000;
        padding: 12px 18px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
}

.preview-container {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1;
    max-height: 450px;
    border: 1px solid #ccc;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: flex-start;
    height: 100%;
}

.search-result {
    display: none;
    height: 100%;
    background-color: var(--card-background);
    border-radius: 16px;
    width: 100%;
    height: 100%;
    padding: 2px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--tertiary-text) transparent;
}

.search-item {
    margin: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    gap: 4px;
    flex-direction: row;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-item-text {
    display: flex;
    gap: 4px;
    flex-direction: column;
}

.search-item-actions {
    display: none;
    gap: 4px;
    flex-direction: row;
}

.search-item:hover {
    background-color: var(--hover-background);
}

.search-item:hover .search-item-actions {
    display: flex;
}

.search-item .caption {
    padding: 0;
    line-height: 1.2;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
}

.search-item-category {
    margin-right: 8px;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item.selected {
    background-color: rgba(0, 121, 107, 0.05); /* 主题色 */
    transition: background-color 0.2s;
}

.search-item.selected .search-item-name {
    font-weight: bold;
    color: var(--primary-color); /* 主题色对比色 */
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.preview-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: red;
    font-weight: bold;
}

.tile-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: none; /* 默认隐藏 */
    background-color: #dbe0e1;
}

.map-scale {
    position: absolute;
    bottom: 6px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1000;
    padding: 4px 8px;
    border-radius: 4px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.scale-bar {
    width: 50px; /* 100米对应25像素（1像素=4地理单位） */
    height: 4px;
    border-bottom: 2px solid #fff;
    border-left: 1px solid #fff;
    border-right: 1px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.scale-text {
    font-size: 12px;
    color: #fff;
}

/* 在map_search/style.css中添加 */
.temp-coords, .temp-name {
  font-size: 14px;
  background: rgba(255,255,255,0.8);
  padding: 8px 12px;
  border-radius: 4px;
}

.temp-footer {
  padding: 16px;
  background: #f8f8f8;
  text-align: center;
}

.footer-caption {
  margin: 8px 0 0;
  font-size: 12px;
  color: #666;
}

/* 在 map_search/style.css 中添加 */
.pin-container {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none; /* 防止遮挡交互 */
    z-index: 10;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.pin-container img {
    width: 30px;
    height: 30px;
    opacity: 0.85;
}

.pin-label { 
    color: transparent;
    white-space: nowrap;
    font-weight: 500;
    height: 16px;
}

/* 在 map_search/style.css 中添加 */
.preview-footer {
    position: absolute;
    right: 12px;
    bottom: 16px;
    width: 90px;
    pointer-events: none; /* 防止遮挡交互 */
    z-index: 10;
    padding-bottom: 0;
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    color: #eee;
    font-size: 12px;
    line-height: 1;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
}

.preview-footer img { 
    width: 100%;
}

.preview-footer p { 
    margin-right: 4px;
    white-space: nowrap;
    text-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
}

.add-new-point {
    display: inline-block;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: underline;
}

.add-new-point:hover {
    color: var(--primary-color-hover);
    text-decoration: none;
}

.no-results {
    display: none;
    padding: 0 12px;
    border-radius: 16px;
    width: 100%;
}

/* 添加标记点模态框样式 */
.modal-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal {
    background-color: var(--card-background);
    border-radius: 16px;
    width: 90%;
    max-width: 540px;
    max-height: 80vh;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.modal-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
}

.modal-content input, .modal-content select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    background-color: var(--input-background);
    color: var(--primary-text);
}

.modal-content input:focus, .modal-content select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.manage-points-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.manage-points-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.manage-points-toolbar button {
    padding: 8px 12px;
    border-radius: 36px;
    cursor: pointer;
}

.manage-points-actions.disabled button {
    opacity: 0.5;
    filter: saturate(0);
    cursor: not-allowed;
}

.manage-points-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 8px;
}

.local-marker-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: background-color 0.2s;
    cursor: pointer;
}

.local-marker-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.local-marker-item .icon-button {
    display: none;
}

.local-marker-item:hover {
    background-color: var(--hover-background);
}

.local-marker-item:hover .icon-button {
    display: flex;
}

.local-marker-item.selected {
    background-color: rgba(0, 121, 107, 0.05); /* 主题色 */
}

.local-marker-item.selected .local-marker-name {
    font-weight: bold;
    color: var(--primary-color); /* 主题色对比色 */
}

.local-marker-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.local-marker-info {
    flex: 1;
    padding: 0 6px;
}

.local-marker-name {
    font-weight: 500;
}

.local-marker-coords {
    font-size: 0.9em;
    color: #666;
}

.local-marker-actions {
    display: flex;
    gap: 4px;
}

.local-marker-actions button {
    padding: 8px;
    border: none;
    border-radius: 48px;
    cursor: pointer;
}

.local-marker-actions button:hover {
    background-color: var(--hover-background);
}

/* 添加尚未采纳标记点的样式 */
.search-item-not-approved {
    font-weight: 600;
    margin-right: 8px;
    display: none; /* 默认隐藏，由JavaScript控制显示 */
}

/* 编辑标记点模态框样式 */
#edit-point-modal .modal-content input,
#edit-point-modal .modal-content select {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    background-color: var(--input-background);
    color: var(--primary-text);
}

#edit-point-modal .modal-content input:focus,
#edit-point-modal .modal-content select:focus {
    outline: none;
    border-color: var(--primary-color);
}
