/* 背景遮罩 */
#edit-address-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* 半透明背景 */
    display: none; /* 默认隐藏 */
    z-index: 1000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

/* 弹窗容器 */
#edit-address-modal .modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 0px;
    width: 90%;
    max-width: 800px;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1001;
}

/* 标题样式 */
#edit-address-modal h3 {
    margin-top: 0;
    font-size: 24px;
    text-align: center;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

/* 表单字段样式 */
#edit-address-modal p {
    margin-bottom: 15px;
}

#edit-address-modal label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #222;
    margin-bottom: 0.5rem;
}

#edit-address-modal input[type="text"], #edit-address-modal input[type="email"], #edit-address-modal select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 0px;
    font-size: 16px;
    box-sizing: border-box;
}

#edit-address-modal input[type="text"]:focus, #edit-address-modal input[type="email"]:focus, #edit-address-modal select:focus {
    border-color: var(--theme_color);
    outline: none;
    box-shadow: 0 0 5px #ffc80285;
}

/* 按钮样式 */
#edit-address-modal .button {
    display: inline-block;
    width: calc(50% - 10px);
    padding: 10px;
    margin-top: 10px;
    font-size: 16px;
    color: #fff;
    background-color: var(--theme_color);
    border: none;
    border-radius: 0;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

#edit-address-modal .button:hover {
    background-color: #000;
    color: white;
    filter: brightness(105%);
}

/* 取消按钮样式 */
#edit-address-modal .button-cancel {
    background-color: #777;
}

#edit-address-modal .button-cancel:hover {
    background-color: #555;
}

/* 弹窗关闭按钮 */
#edit-address-modal .close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #f1f1f1;
    color: #555;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    text-align: center;
    line-height: 30px;
    cursor: pointer;
}

#edit-address-modal .close-modal:hover {
    background: #e1e1e1;
}

#edit-address-form {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 0.5rem 1.5rem;
}
#edit-address-form .full{
    grid-column: span 2;
}
.custom-shipping-address-list {
    max-height: 400px; /* 设置最大高度 */
    overflow-y: auto;  /* 添加垂直滚动条 */
    padding: 1.5rem;
    border: 1px solid #dbdbdb;
    margin-bottom: 1.5rem;
}

.custom-shipping-address-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid #dbdbdb;
    margin-bottom: 1.5rem;
    transition: background-color 0.3s;
}

.custom-shipping-address-list li.active {
    outline: 2px solid var(--theme_color);
    border-color: var(--theme_color);
    background-color: #f0f8ff; /* 轻微背景色以突出显示 */
}

.custom-shipping-address-list li p {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    margin: 0; /* 去除底部外边距 */
    max-width: 70%; /* 限制地址信息的宽度，给按钮留空间 */
    white-space: nowrap; /* 不换行 */
    overflow: hidden; /* 溢出部分隐藏 */
    text-overflow: ellipsis; /* 使用省略号显示溢出的文本 */
}

.custom-shipping-address-list li .button-group {
    display: flex;
    gap: 10px;
}

.custom-shipping-address-list li button {
    padding: 0.5rem 1rem;
    font-size: 14px;
    font-weight: 400 !important;
    text-transform: uppercase;
    border-radius: 0 !important;
    transition: all 0.3s;
}

.custom-shipping-address-list li button.use-address-button {
    background-color: var(--theme_color);
    color: #000;
}

.custom-shipping-address-list li button.edit-address-button {
    background-color: #000;
    color: white;
}

/* 自定义滚动条样式 */
.custom-shipping-address-list::-webkit-scrollbar {
    width: 8px; /* 滚动条宽度 */
}

.custom-shipping-address-list::-webkit-scrollbar-track {
    background: #f1f1f1; /* 滚动条轨道背景色 */
}

.custom-shipping-address-list::-webkit-scrollbar-thumb {
    background-color: #007cba; /* 滚动条颜色 */
    border-radius: 10px; /* 滚动条圆角 */
    border: 2px solid #f1f1f1; /* 滚动条内边距和轨道间的间隔 */
}

.custom-shipping-address-list::-webkit-scrollbar-thumb:hover {
    background-color: #005a8d; /* 悬停时滚动条颜色 */
}


#search-address {
    margin-left: 20px;
    padding: 5px;
    font-size: 14px;
}

#load-more-addresses {
    margin-top: 10px;
    display: block;
}


#search-address{
    padding: 0.7rem 1.5rem;
    border: 1px solid #dbdbdb;
    margin-left: 0;
    width: 50%;
    margin-bottom: 2rem;
    font-size: 18px;
    color: #000;
}


#search_address{
    display: block;
    margin-left: auto;
    width: 30%;
    padding: 13px 13px;
    color: #999;
    border: 1px solid #dfdfdf;
    font-size: 1rem;
    border-radius: 0;
}

 /* input[name="shipping_custom_name"]{
    border-bottom: 1px solid #dfdfdf;
    margin: 0 auto;
    font-weight: 700;
    margin-bottom: 50px;
    font-size: 1.8rem !important;
    text-transform: capitalize;
    width: 100%;
    padding: 0 !important;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    color: #161616 !important;
    background-color: transparent !important;
    border: none !important;
    margin: 0 !important;
    cursor: pointer;
} */

.address-grid{
    padding-bottom: 5rem;
}


.empty_address{
    text-align: center;
    grid-column: span 3;
}
.empty_address h1{
    font-size: 30px;
    margin-bottom: 0.5rem;
}
.empty_address p{
    color: #494949;
    font-size: 17px;
    line-height: 30px;
}
.add_new_address{
    display: inline-block;
    padding: 0.9rem 2rem;
    background-color: var(--theme_color);
    color: #000;
    font-weight: 500;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.3s;
    margin-top: 1rem;
}
.add_new_address:hover{
    background-color: #000;
    color: #fff;
}

#search_address+.add_new_address{
    margin-top: 0;
}
.addressed_title strong{
    font-size: 30px;
}
.addressed_title {
    margin-bottom: 2rem;
    gap: 1rem;
}

.address_item{
    padding: 1.5rem;
    /* background-color: #f8f8f8; */
    border: 1px solid #eee;
    color: #000;
    cursor: pointer;
}
.address_item.active{
    border-color: var(--theme_color);
    outline: 1px solid var(--theme_color);
}
.address_item strong{
    font-size: 22px;
    display: block;
}
.address_item p{
    font-size: 1.1rem;
    line-height: 1.5;
}
.address_item .edit-address-button{
    width: 23px;
    height: 23px;
    cursor: pointer;
    display: inline-block;
    background: url('../img/edit.svg') no-repeat center/contain;
    text-indent: -9999px;
}