/* 地图下载 /public/support/map-download —— 对齐 iGPSPORT 级联搜索交互 */
.download-map-page {
    padding: 24px 0 96px;
    color: #1a1a1a;
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

.download-map-page a:focus,
.download-map-page a:active,
.download-map-page button:focus,
.download-map-page button:active {
    outline: none;
    box-shadow: none;
}

.download-map-page a {
    -webkit-tap-highlight-color: transparent;
}

.dm-head {
    position: relative;
    margin: 8px 0 28px;
    text-align: center;
}

.dm-title {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #111;
}

.dm-lang {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.dm-lang-mark {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #888;
    white-space: nowrap;
    line-height: 1;
}

.dm-lang-control {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dm-lang-select {
    height: 34px;
    min-width: 118px;
    padding: 0 32px 0 12px;
    border: 1px solid #ddd;
    border-radius: 999px;
    background: #f7f7f7;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    line-height: 32px;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.dm-lang-select::-ms-expand {
    display: none;
}

.dm-lang-caret {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    transition: color 0.2s ease;
}

.dm-lang-select:hover {
    border-color: #bbb;
    background: #fff;
    color: #111;
}

.dm-lang-control:hover .dm-lang-caret {
    color: #555;
}

.dm-lang-select:focus,
.dm-lang-select:focus-visible,
.dm-lang-select:active {
    outline: none;
    border: 1px solid #111;
    background: #fff;
    color: #111;
    box-shadow: none;
}

.dm-lang-control:focus-within .dm-lang-caret {
    color: #111;
}

.dm-howto {
    max-width: 720px;
    margin: 0 auto 36px;
    color: #333;
    font-size: 14px;
    line-height: 1.8;
}

.dm-howto-title {
    margin: 0 0 4px;
    font-weight: 600;
}

.dm-howto-list {
    margin: 0;
    padding-left: 1.4em;
}

.dm-picker {
    position: relative;
    max-width: 720px;
    margin: 0 auto 20px;
}

.dm-search-wrap {
    position: relative;
}

.dm-search {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 48px 0 22px;
    border: 1px solid #2a2a2a;
    border-radius: 999px;
    background: #fff;
    font-size: 15px;
    color: #111;
    box-sizing: border-box;
}

.dm-search::placeholder {
    color: #b0b0b0;
}

.dm-search:focus {
    border-color: #111;
    outline: none;
}

.dm-search-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #666;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dm-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    z-index: 20;
    display: flex;
    height: 320px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    border: 1px solid #eee;
}

/* 仅大洲：宽度仍铺满，高度随内容 */
.dm-panel.is-continents-only {
    height: auto;
    max-height: 320px;
}

.dm-panel[hidden] {
    display: none !important;
}

.dm-panel-left,
.dm-panel-right {
    overflow-y: auto;
    height: 100%;
}

.dm-panel-left {
    flex: 0 0 42%;
    border-right: 1px solid #f0f0f0;
    background: #fafafa;
}

.dm-panel-right {
    flex: 1 1 auto;
    background: #fff;
}

.dm-panel-right[hidden] {
    display: none !important;
}

/* 第一步：只显示大洲 */
.dm-panel.is-continents-only .dm-panel-left {
    flex: 1 1 100%;
    border-right: 0;
    background: #fff;
    max-height: 320px;
}

/* 搜索：只显示匹配国家 */
.dm-panel.is-searching .dm-panel-left {
    display: none;
}

.dm-panel.is-searching .dm-panel-right {
    flex: 1 1 100%;
}

.dm-cont-item,
.dm-country-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 14px 18px;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 14px;
    color: #222;
    cursor: pointer;
    line-height: 1.3;
}

.dm-cont-item:hover,
.dm-country-item:hover {
    background: #f3f3f3;
}

.dm-cont-item.is-active {
    background: #ebebeb;
    font-weight: 600;
}

.dm-cont-arrow {
    color: #bbb;
    font-size: 12px;
    margin-left: 8px;
}

.dm-country-item {
    justify-content: flex-start;
}

.dm-empty {
    padding: 24px 18px;
    color: #999;
    font-size: 13px;
}

.dm-status {
    max-width: 720px;
    margin: 0 auto 16px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #f0f6ff;
    color: #356;
    font-size: 14px;
}

.dm-status.is-error {
    background: #fff2f0;
    color: #a33;
}

.dm-result {
    max-width: 720px;
    margin: 18px auto 0;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    background: #f5f5f5;
    border-radius: 10px;
    box-sizing: border-box;
}

.dm-result[hidden] {
    display: none !important;
}

.dm-result-name {
    flex: 0 0 auto;
    min-width: 72px;
    font-size: 22px;
    font-weight: 700;
    color: #111;
}

.dm-result-meta {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    min-width: 0;
}

.dm-result-field {
    text-align: left;
    line-height: 1.35;
}

.dm-result-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #999;
}

.dm-result-value {
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

.dm-result-download {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 40px;
    padding: 0 22px;
    border-radius: 999px;
    background: #111;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.dm-result-download.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

.dm-result-download:hover,
.dm-result-download:focus {
    background: #333;
    color: #fff !important;
    text-decoration: none !important;
}

.dm-result-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 140px;
}

.dm-progress {
    width: 100%;
}

.dm-progress[hidden] {
    display: none !important;
}

.dm-progress-bar {
    height: 6px;
    border-radius: 999px;
    background: #e5e5e5;
    overflow: hidden;
}

.dm-progress-bar > span {
    display: block;
    height: 100%;
    width: 0;
    background: #111;
    border-radius: 999px;
    transition: width 0.15s linear;
}

.dm-progress-text {
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    text-align: center;
}

@media (max-width: 767px) {
    .dm-title {
        font-size: 24px;
    }

    .dm-lang {
        position: static;
        transform: none;
        display: inline-flex;
        justify-content: center;
        margin-top: 12px;
    }

    .dm-panel {
        height: 360px;
        flex-direction: column;
    }

    .dm-panel-left {
        flex: 0 0 42%;
        border-right: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .dm-result {
        flex-wrap: wrap;
        padding: 18px 16px;
        gap: 16px;
    }

    .dm-result-name {
        width: 100%;
    }

    .dm-result-meta {
        width: 100%;
        justify-content: flex-start;
        gap: 28px;
    }

    .dm-result-download {
        width: 100%;
    }
}
