input[type="text"]:focus {
    border-color: #357AC0; /* 高亮颜色为主色 */
    outline: none; /* 去掉默认的聚焦样式 */
}

/* Prevent page layout shift when a modal opens/closes.
   When JS sets `body.style.overflow = 'hidden'` the browser may hide the
   vertical scrollbar which changes the viewport width and causes a horizontal
   jump/抖动. The following rules reserve space for the scrollbar so hiding it
   doesn't change layout.

   - `scrollbar-gutter: stable` is the modern API (supported in recent browsers).
   - `overflow-y: scroll` is a wide-compat fallback that always shows the
     scrollbar track even when content doesn't overflow.
*/
html {
    scrollbar-gutter: stable;
    /* fallback for older browsers */
    overflow-y: scroll;
}

/* Modal styles for 我的订阅 */
.modal2 {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal2.hide {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}
.modal2.show {
    visibility: visible;
    opacity: 1;
}
.modal-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.25);
}
.modal-dialog {
    position: relative;
    border-radius: var(--radius-10, 10px);
   background: linear-gradient(180deg, rgba(53, 122, 192, 0.20) -9.21%, rgba(53, 122, 192, 0.00) 23.68%), #FFF;
    width: 420px;
    max-width: 299px;
    border-radius: 8px;
    overflow: hidden;
    padding: 0 24px 20px 24px;
   
    z-index: 2;
    text-align: center;
}


.modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    /* background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08); */
    font-size: 1.5rem;
    line-height: 32px;
    cursor: pointer;
    color: #8f9aa6;
}

.modal-title {
    margin: 14px 0 6px 0;
    font-size: 1rem ;
    color: #222;
    font-weight: 700;
   
}

.modal-body {
    color: #4a4a4a;
    font-size: 14px;
    margin-bottom: 18px;
    text-align: left;
}

.subscription-list {
    color: #357AC0;
    font-weight: 600;
    margin-top: 8px;
    font-size: 1rem;
}

.subscription-list a {
    color: #357AC0;
    text-decoration: none;
}

.more-addresses {
    display: inline-block;
    margin: 0 0 12px 0;
    color: #357AC0;
    text-decoration: none;
    font-weight: 500;
}
/* .more-addresses::after {
    content: '\00a0›';
    color: #357AC0;
} */

.modal-footer {
    display: flex;
    justify-content: center;
}

.modal-confirm {
    background: #357AC0;
    color: #fff;
    border: none;
    width: 100%;
    max-width: 320px;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}
input[type="text"]:focus {
    border-color: #357AC0; /* 高亮颜色为主色 */
    outline: none; /* 去掉默认的聚焦样式 */
}
/* Addresses modal (查看更多地址) */
.addresses-modal-dialog {
    position: relative;
    width: 920px;
    max-width: calc(100% - 40px);
    background: #fff;
    border-radius: 6px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    z-index: 2100;
}
.addresses-container {
    display: flex;
    gap: 18px;
}
.addresses-left {
    width: 320px;
    display: flex;
    flex-direction: column;
    padding: 10px;
   border-radius:  6px;
border: 1px solid  #EBEBEB;
}
.addresses-search {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid  #EBEBEB;
}
.input-with-btn { position: relative; width: 100%; }
.addresses-search-input {
    width: 100%;
    padding: 8px 44px 8px 12px; /* reserve space for button */
    border: 1px solid #e6eefc;
    border-radius: 4px;
    box-sizing: border-box;
}
.addresses-search-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 33px;
    width: 74px;
    border-top-right-radius: 4px;
     border-bottom-right-radius: 4px;
    border: none;
    background: #357AC0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-around;
    cursor: pointer;
}

.addresses-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    max-height: 520px;
}
.addresses-list li {
    padding: 10px 6px;
    border-bottom: 1px solid #f1f5fb;
}
.addresses-list li .title {
   
    color: #171717;
    margin-bottom: 6px;
}
.addresses-list li .addr {
    color: #6b6b6b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px; /* 图标与文字间距 */
}

.addresses-list li .addr img {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: block;
}
/* 选中态高亮 */
.addresses-list li.active .title {
    color: #357AC0; /* 高亮主色 */
}
.addresses-list li.active .addr {
    color: #357AC0;
}
.addresses-list li { transition: background-color 0.18s ease; }
/* .addresses-list li.active { background-color: rgba(53,122,192,0.05); } */
.addresses-right {
    flex: 1;
}
.addresses-map img {
    width: 100%;
    height: 560px;
    object-fit: cover;
    border-radius: 4px;
}
.addresses-modal-close {
    /* position: absolute;
    right: 10px;
    top: 8px; */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background:none ;

    font-size: 18px;
    cursor: pointer;
}

.addresses-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 8px;
    border-bottom: 1px solid #f1f5fb;
    margin-bottom: 20px;
}
.addresses-title {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}
/* Responsive Design */
@media (max-width: 768px) {
     html {
        font-size: 14px; /* 在中等屏幕上缩小基准字体 */
    }

   
      .modal-dialog {
        width: 80%;
        max-width: 720px;
        padding: 0 18px 18px 18px;
    }
    .modal-title {
        font-size: 1rem;
    }
    .modal-close {
        right: 10px;
        top: 10px;
    }
        .addresses-modal-dialog { width: 92%; }
    .addresses-map img { height: 420px; }
        .addresses-modal-dialog { width: 98%; padding: 12px; }
    .addresses-container { flex-direction: column; }
    .addresses-left { width: 94%; }
    .addresses-map img { height: 240px; }
    .addresses-list { max-height: 260px; }
}