/* Address Modal Styles */
.address-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.address-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 540px;
    width: 100%;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.1);
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.address-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    background: linear-gradient(135deg, #eb3100 0%, #ff4520 100%);
    color: #fff;
}

.address-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #fff;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    width: 36px;
    height: 36px;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-close-btn i {
    font-size: 24px;
}

.address-modal-body {
    padding: 32px 28px;
    background: #fafafa;
}

.modal-description {
    margin: 0 0 20px 0;
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

.address-modal-input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: 'Lato', sans-serif;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.address-modal-input:focus {
    outline: none;
    border-color: #eb3100;
    box-shadow: 0 0 0 4px rgba(235, 49, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    background: #fff;
}

.address-modal-input::placeholder {
    color: #aaa;
}

/* Edit button in header */
.address-banner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.address-banner span {
    flex: 1;
}

.edit-address-btn {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    padding: 0;
}

.edit-address-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.6);
}

.edit-address-btn:active {
    transform: scale(0.95);
}

.edit-address-btn i {
    color: #fff;
    font-size: 18px;
}

/* Google Maps Autocomplete Dropdown in Modal */
.pac-container {
    z-index: 10001 !important;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    border: 1px solid #e0e0e0;
    margin-top: 8px;
    font-family: 'Lato', sans-serif;
    overflow: hidden;
}

.pac-item {
    padding: 14px 18px;
    border-top: 1px solid #f5f5f5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pac-item:first-child {
    border-top: none;
}

.pac-item:hover {
    background: #f8f8f8;
}

.pac-item-selected {
    background: #fff3f2;
}

.pac-icon {
    margin-right: 14px;
    background-size: 18px;
}

.pac-item-query {
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

.pac-matched {
    font-weight: 700;
    color: #eb3100;
}

/* Responsive */
@media (max-width: 768px) {
    .address-modal {
        max-width: 100%;
        margin: 0;
        border-radius: 20px 20px 0 0;
        position: absolute;
        bottom: 0;
    }

    .address-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .address-modal-header {
        padding: 20px 24px;
    }

    .address-modal-body {
        padding: 28px 24px;
    }

    .edit-address-btn {
        width: 32px;
        height: 32px;
    }

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