.saved-locations-modal {
    position: fixed;
    inset: 0;
    z-index: 12050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.saved-locations-modal.open {
    display: flex;
}

.saved-locations-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 40, 0.72);
}

.saved-locations-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 32rem);
    max-height: min(88vh, 40rem);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(201, 168, 76, 0.35);
    border-radius: 0.85rem;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.saved-locations-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: #0A1628;
    color: #C9A84C;
}

.saved-locations-modal-title {
    font-family: "Playfair Display", serif;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.saved-locations-modal-close {
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(147, 197, 253, 0.65);
    background: rgba(219, 234, 254, 0.95);
    color: #0A1628;
    border-radius: 0.35rem;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.saved-locations-modal-body {
    padding: 1rem 1.1rem 1.15rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.saved-locations-modal-hint {
    font-size: 0.85rem;
    color: #475569;
    margin: 0 0 0.85rem;
}

.saved-locations-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.saved-locations-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid #d1d9e6;
    border-radius: 0.55rem;
    background: #f8fafc;
}

.saved-locations-item-select {
    flex: 1;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #0A1628;
}

.saved-locations-item-label {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.15rem;
}

.saved-locations-item-detail {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.35;
}

.saved-locations-item-remove {
    background: none;
    border: none;
    color: #b91c1c;
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0.15rem 0.25rem;
    white-space: nowrap;
}

.saved-locations-empty {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 0.85rem;
}

.saved-locations-save-row {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.saved-locations-message {
    margin-top: 0.65rem;
    font-size: 0.82rem;
}

.saved-locations-message.is-error {
    color: #b91c1c;
}

.saved-locations-message.is-success {
    color: #15803d;
}

@media (min-width: 480px) {
    .saved-locations-save-row {
        flex-direction: row;
        align-items: center;
    }

    .saved-locations-save-row .form-input {
        flex: 1;
    }
}

#page-members-profile .saved-locations-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

#page-members-profile .saved-locations-item-select {
    color: #fff;
}

#page-members-profile .saved-locations-item-detail {
    color: rgba(255, 255, 255, 0.55);
}

.saved-locations-type-badge {
    display: inline-block;
    margin-right: 0.45rem;
    padding: 0.1rem 0.45rem;
    border-radius: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
}

.saved-locations-type-pickup {
    background: rgba(201, 168, 76, 0.18);
    color: #C9A84C;
    border: 1px solid rgba(201, 168, 76, 0.35);
}

.saved-locations-type-dropoff {
    background: rgba(96, 165, 250, 0.15);
    color: #1d4ed8;
    border: 1px solid rgba(96, 165, 250, 0.35);
}

#page-members-profile .saved-locations-type-dropoff {
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.35);
}
