.address-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.address-selection-modal:not(.active) {
    z-index: -9999;
}
.address-selection-modal.active {
    opacity: 1;
}
.address-selection-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}
.address-selection-modal.active .address-selection-content {
    transform: translateY(0);
}
.address-selection-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.address-selection-header h3 {
    margin: 0;
    font-size: 1.2rem;
}
.close-address-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}
.address-container {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}
.address-list {
    margin-bottom: 20px;
}
.address-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}
.address-item:hover {
    border-color: #FFDB58;
}
.address-item.selected {
    border-color: #FFDB58;
    background: rgba(255, 219, 88, 0.1);
}
.address-item .address-item-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    z-index: 2;
}
.address-item .edit-address-btn,
.address-item .delete-address-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.address-item .edit-address-btn {
    color: #666;
}
.address-item .edit-address-btn:hover {
    background: #f8f9fa;
    transform: scale(1.05);
}
.address-item .delete-address-btn {
    color: #dc3545;
}
.address-item .delete-address-btn:hover {
    background: #fff5f5;
    transform: scale(1.05);
}
.address-item .edit-address-btn i,
.address-item .delete-address-btn i {
    font-size: 1.1rem;
}
.address-item .address-details {
    padding-top: 10px;
}
.address-actions {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: white;
    flex-shrink: 0;
    border-bottom-right-radius: 12px;
    border-bottom-left-radius: 12px;
}
.add-new-address-btn, 
.continue-to-payment-btn,
.cancel-address-btn,
.save-address-btn {
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.add-new-address-btn {
    background: #f8f9fa;
    color: #333;
}
.continue-to-payment-btn {
    background: #FFDB58;
    color: #333;
}
.continue-to-payment-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
.cancel-address-btn {
    background: #f8f9fa;
    color: #666;
}
.save-address-btn {
    background: #FFDB58;
    color: #333;
}
.loading-addresses, .no-addresses {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}
.loading-addresses i, .no-addresses i {
    font-size: 48px;
    color: #FFDB58;
    margin-bottom: 15px;
}
.loading-addresses p, .no-addresses p {
    margin: 0;
    color: #666;
}
.no-addresses-hint {
    font-size: 0.9rem;
    margin-top: 8px !important;
    color: #999 !important;
}
.address-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}
.form-group textarea {
    height: 80px;
    resize: vertical;
}
.map-container {
    margin-top: 10px;
}
.address-map {
    width: 100%;
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}
.location-status {
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
    background: #f8f9fa;
    text-align: center;
    font-size: 14px;
    color: #666;
}
.payment-container {
    padding: 20px;
    overflow-y: auto;
}
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.payment-method {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.payment-method.disabled {
    background-color: #f5f5f5;
    filter: grayscale(1);
    cursor: not-allowed;
}
.payment-method:not(.disabled):hover {
    border-color: #FFDB58;
}
.payment-method.selected {
    border-color: #FFDB58;
    background: rgba(255, 219, 88, 0.1);
}
.payment-method i {
    font-size: 24px;
    color: #666;
}
.payment-method.selected i {
    color: #FFDB58;
}
.payment-method-details h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}
.payment-method img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    object-position: bottom;
}
.payment-method-details p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}
.payment-method.disabled .payment-method-details p, .payment-method.disabled .payment-method-details h4 {
    color: #9b9b9b;
}
.payment-actions {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}
.back-to-address-btn,
.proceed-payment-btn {
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}
.back-to-address-btn {
    background: #f8f9fa;
    color: #666;
}
.proceed-payment-btn {
    background: #FFDB58;
    color: #333;
}
@media (max-width: 768px) {
    .payment-actions {
       margin-top: auto;
    }
    .address-selection-modal {
        align-items: flex-end;
    }
    .address-selection-content {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        height: 90vh;
        display: flex;
        flex-direction: column;
        transform: translateY(100%);
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
    .address-selection-modal.active .address-selection-content {
        transform: translateY(0);
    }
    .address-selection-header {
        padding: 12px 20px;
        position: sticky;
        top: 0;
        background: white;
        z-index: 2;
        border-bottom: 1px solid #eee;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }
    .address-container {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 15px 20px;
    }
    .address-actions {
        padding: 15px;
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 2;
        border-top: 1px solid #eee;
        margin-top: auto;
    }
    .address-selection-header h3 {
        font-size: 1.1rem;
    }
    .close-address-modal {
        font-size: 1.3rem;
    }
    .add-new-address-btn, 
    .continue-to-payment-btn,
    .cancel-address-btn,
    .save-address-btn {
        padding: 10px;
        font-size: 0.95rem;
    }
    .back-to-address-btn,
    .proceed-payment-btn {
        font-size: 13px;
    }
}