/* 收货地址页面样式 */

/* 内容头部样式 */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.add-address-btn {
    background-color: #00823C;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.add-address-btn:hover {
    background-color: #006e33;
    box-shadow: 0 4px 12px rgba(0, 130, 60, 0.2);
}

.add-address-btn i {
    font-size: 16px;
}

/* 地址列表样式 */
.address-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    padding: 0 0 25px;
}

/* 地址项样式 */
.address-item {
    position: relative;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    transition: all 0.3s;
    animation: fadeIn 0.5s ease;
    border: 1px solid #eee;
}

.address-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.address-item.default {
    border-color: #00823C;
}

.default-tag {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #00823C;
    color: #fff;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 0 10px 0 10px;
}

.address-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.receiver-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.receiver-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.receiver-phone {
    color: #666;
}

.address-content {
    margin-bottom: 15px;
}

.address-text {
    color: #666;
    line-height: 1.5;
}

.address-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.address-action-btn {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.edit-btn {
    background-color: #f0f7f4;
    border: 1px solid #00823C;
    color: #00823C;
}

.edit-btn:hover {
    background-color: #00823C;
    color: #fff;
}

.delete-btn {
    background-color: #fff0f0;
    border: 1px solid #ff4d4f;
    color: #ff4d4f;
}

.delete-btn:hover {
    background-color: #ff4d4f;
    color: #fff;
}

/* 无地址提示样式 */
.no-address {
    text-align: center;
    padding: 60px 0;
}

.no-address-icon {
    font-size: 60px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-address h3 {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.no-address p {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
}

.add-address-btn-empty {
    background-color: #00823C;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.add-address-btn-empty:hover {
    background-color: #006e33;
    box-shadow: 0 4px 12px rgba(0, 130, 60, 0.2);
}

/* 地址弹窗样式 */
.address-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.address-modal.active {
    display: flex;
}

.address-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    z-index: 9999;
}

.address-modal-content {
    position: relative;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 10001;
    overflow: hidden;
    animation: scaleIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.address-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.address-modal-title {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.address-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.address-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #00823C;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 130, 60, 0.1);
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.address-region .region-select {
    display: flex;
    gap: 10px;
}

.address-region .region-select select {
    flex: 1;
}

.default-address {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #00823C;
}

input:focus + .slider {
    box-shadow: 0 0 1px #00823C;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.switch-label {
    font-weight: normal;
}

.address-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.address-modal-cancel {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #666;
}

.address-modal-cancel:hover {
    background-color: #e0e0e0;
}

.address-modal-save {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #00823C;
    border: 1px solid #00823C;
    color: #fff;
}

.address-modal-save:hover {
    background-color: #006e33;
}

/* 响应式样式 */
@media (max-width: 992px) {
    .address-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .add-address-btn {
        width: 100%;
        justify-content: center;
    }
    
    .address-region .region-select {
        flex-direction: column;
    }
    
    .address-actions {
        flex-direction: column;
    }
    
    .address-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 确认删除弹窗样式 */
.confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.confirm-dialog.active {
    display: flex;
}

.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    z-index: 9999;
}

.confirm-dialog-content {
    position: relative;
    width: 400px;
    max-width: 90%;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    overflow: hidden;
    animation: scaleIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.confirm-dialog-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.confirm-dialog-title {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.confirm-dialog-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.confirm-dialog-body {
    padding: 25px 20px;
    text-align: center;
}

.confirm-icon {
    font-size: 48px;
    color: #ff4d4f;
    margin-bottom: 15px;
}

.confirm-message {
    font-size: 16px;
    color: #333;
    margin: 0;
}

.confirm-dialog-footer {
    padding: 15px 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.confirm-dialog-cancel {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #666;
}

.confirm-dialog-cancel:hover {
    background-color: #e0e0e0;
}

.confirm-dialog-confirm {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #ff4d4f;
    border: 1px solid #ff4d4f;
    color: #fff;
}

.confirm-dialog-confirm:hover {
    background-color: #ff2b2e;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.2);
} 