/* 收货地址 */
.address-page {
    padding-bottom: 80px;
}

.address-page-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0 16px;
}

.address-back {
    color: var(--cm-text);
    font-size: 22px;
    line-height: 1;
    text-decoration: none;
}

.address-page-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.address-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.address-card {
    background: var(--cm-card-bg);
    border-radius: var(--cm-radius);
    box-shadow: var(--cm-shadow);
    padding: 14px;
}

.address-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.address-name {
    font-size: 16px;
    font-weight: 600;
}

.address-mobile {
    font-size: 14px;
    color: var(--cm-text-secondary);
}

.address-default-tag {
    font-size: 11px;
    color: #ff5722;
    background: #fff0eb;
    padding: 2px 8px;
    border-radius: 4px;
}

.address-full {
    font-size: 13px;
    color: var(--cm-text-secondary);
    line-height: 1.5;
}

.address-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--cm-border);
}

.btn-address-action {
    border: none;
    background: none;
    font-size: 13px;
    color: var(--cm-text-secondary);
    text-decoration: none;
    padding: 0;
}

.btn-address-action.danger {
    color: #ff4757;
}

.btn-address-action .fa {
    margin-right: 4px;
}

.address-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
}

.address-bottom-bar .community-container,
.address-page.community-container .address-bottom-bar {
    max-width: var(--cm-container-max);
    margin: 0 auto;
}

.address-form {
    padding: 0;
    overflow: hidden;
}

.address-form-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--cm-border);
    gap: 12px;
}

.address-form-item label {
    width: 72px;
    flex-shrink: 0;
    margin: 0;
    font-weight: normal;
    color: var(--cm-text);
}

.address-form-item .form-control {
    flex: 1;
    border: none;
    box-shadow: none;
    padding: 0;
}

.address-form-item textarea.form-control {
    min-height: 72px;
    resize: vertical;
}

.address-form-region {
    align-items: stretch;
}

.address-region-trigger {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: none;
    background: none;
    padding: 0;
    text-align: left;
    color: var(--cm-text);
}

.address-region-trigger .area-picker-value.is-placeholder {
    color: var(--cm-text-muted);
}

.address-form-switch {
    justify-content: space-between;
}

.address-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin: 0;
}

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

.address-switch-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 24px;
    transition: 0.2s;
    cursor: pointer;
}

.address-switch-slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    bottom: 2px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}

.address-switch input:checked + .address-switch-slider {
    background: var(--cm-primary);
}

.address-switch input:checked + .address-switch-slider:before {
    transform: translateX(20px);
}

.address-submit {
    margin: 16px;
    width: calc(100% - 32px);
}

@media (min-width: 768px) {
    .address-bottom-bar {
        position: static;
        padding: 16px 0;
        box-shadow: none;
        background: transparent;
    }
}
