.marker-map,
input[type=radio] {
    position: absolute;
    pointer-events: none
}

.leaflet-control-attribution.leaflet-control,
.wcm-hidden {
    display: none !important
}

input[type=radio] {
    opacity: 0
}

p.form-row label {
    font-size: 12px
}

.marker-map {
    left: 50%;
    top: 50%;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -100%);
    z-index: 600
}

.wcm-header,
.wcm-modal {
    align-items: center;
    display: flex
}

.wcm-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    justify-content: center
}

.modal-address-detail label {
    font-size: 14px
}

.wcm-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55)
}

#wcm-map-container,
.wcm-address-form-compact #wcm-map-container,
.wcm-modal-box {
    position: relative
}

.wcm-modal-box {
    width: 600px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    min-height: 10vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .18)
}

#wcm-address-map {
    min-height: 60vh;
    border-radius: 10px;
    transition: min-height .35s
}

#wcm-address-map.map-selected {
    min-height: 30vh !important;
    pointer-events: none
}

#wcm-address-map.map-selected .leaflet-control-zoom,
#wcm-address-map.map-selected a.leaflet-bar-part.leaflet-bar-part-single,
.wcm-map-picker.map-confirmed .wcm-confirm-map-location,
.wcm-map-picker.map-confirmed .wcm-map-hint,
.wcm-map-picker.map-confirmed-checkout .wcm-confirm-map-location {
    display: none
}

.wcm-map-confirmed-msg {
    color: var(--wcma-primary);
    font-size: 13px;
    margin: 8px 0 0;
    font-weight: 600
}

#wcm_city_select_field .select2-container {
    width: 100% !important;
    max-width: 100% !important
}

#wcm_city_select_field select {
    width: 100% !important
}

#wcm-map-checkout.map-selected {
    opacity: .85
}

.wcm-confirm-map-location {
    width: 100%;
    margin-top: 10px;
    border-radius: 10px !important;
    height: 40px
}

.wcm-checkout-welcome {
    background: var(--wcma-primary-12);
    border: 1px solid var(--wcma-primary-40);
    border-radius: 10px;
    padding: 14px 16px;
    margin: 12px 0
}

.wcm-checkout-welcome p {
    margin: 0;
    color: #444;
    font-size: 14px;
    line-height: 1.6
}

@media (max-width:768px) {
    .wcm-modal-box {
        width: 100%;
        min-height: 100vh;
        padding: 10px;
        border-radius: 0
    }

    #wcm-address-map {
        min-height: 90vh
    }

    .wcm-modal-content {
        margin-top: 30px
    }
}

.form-row {
    padding: unset !important;
    margin: unset !important;
}

.wcm-checkout-modal-box {
    width: min(640px, 92vw)
}

.modal-btn {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-direction: row
}

.wcm-header {
    justify-content: space-between;
    margin-bottom: 20px
}

.wcm-address-card,
.wcm-address-form .form-row {
    margin-bottom: 12px
}

.wcm-address-card {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 16px
}

.wcm-address-card-header h4 {
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 8px
}

.wcm-badge {
    background: var(--wcma-primary);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 400
}

.wcm-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px
}

.wcm-address-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600
}

.wcm-address-form input[type=tel],
.wcm-address-form input[type=text],
.wcm-address-form select,
.wcm-address-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--wcma-input-border-color, #ddd);
    border-radius: var(--wcma-input-radius, 6px)
}

.wcm-map-hint {
    margin: 8px 0;
    font-size: 13px;
    color: #666
}

.wcm-map-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .8);
    z-index: 1000
}

.wcm-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e5e5;
    border-top-color: var(--wcma-primary);
    border-radius: 50%;
    animation: .8s linear infinite wcm-spin
}

@keyframes wcm-spin {
    to {
        transform: rotate(360deg)
    }
}

.wcm-checkout-address-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
    overflow-y: scroll;
    max-height: 420px;
    padding-left: 6px
}

.wcm-checkout-address-item {
    display: flex;
    gap: 12px;
    padding: 14px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    cursor: pointer;
    opacity: .5;
    transition: .2s, background .2s
}

.wcm-checkout-address-item:has(input:checked) {
    border-color: var(--wcma-primary);
    background: var(--wcma-primary-8);
    opacity: 1
}

.wcm-checkout-address-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px
}

.wcm-checkout-address-info strong,
.wcm-selected-title {
    font-size: 15px
}

.wcm-modal-desc {
    color: #666;
    margin: 0;
    font-size: 12px
}

.wcm-modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between
}

.wcm-empty {
    color: #888;
    padding: 20px 0
}

.wcm-msg-inline {
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px
}

.wcm-msg-inline.success {
    background: var(--wcma-primary-12);
    color: var(--wcma-primary)
}

.wcm-msg-inline.error {
    background: rgba(239, 68, 68, .12);
    color: var(--wcma-error-color, #ef4444)
}

.wcm-address-form-compact .wcm-location-fields {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.wcm-address-form-compact .form-row-half {
    flex: 1;
    min-width: 140px;
    margin-bottom: 12px
}

.wcm-address-form-compact .button-primary {
    width: 100%;
    text-align: center;
    padding: 10px
}

.wcm-selected-address-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    background: var(--wcma-primary-8);
    border: 1px solid var(--wcma-primary-20);
    border-radius: 10px;
    flex-wrap: wrap
}

.wcm-selected-address-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1
}

.wcm-selected-label {
    font-size: 12px;
    color: #666
}

.wcm-selected-detail {
    font-size: 13px;
    color: #444
}

#wcm-change-address {
    white-space: nowrap
}

.wcm-custom-title-row input {
    width: 100%
}

.loader-btn {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 16px 0 #fff, -16px 0 #fff;
    position: absolute;
    left: 50%;
    top: 40%;
    animation: .5s ease-out infinite alternate flash
}

@keyframes flash {
    0% {
        background-color: #fff2;
        box-shadow: 16px 0 #fff2, -16px 0 #fff
    }

    50% {
        background-color: #fff;
        box-shadow: 16px 0 #fff2, -16px 0 #fff2
    }

    100% {
        background-color: #fff2;
        box-shadow: 16px 0 #fff, -16px 0 #fff2
    }
}

.delete-address {
    background-color: var(--wcma-error-color, #ef4444) !important;
    color: #fff !important;
    border-radius: 10px !important;
    transition: .3s !important
}

.default-address {
    border: 2px solid var(--wcma-primary) !important;
    border-radius: 10px !important;
    color: var(--wcma-primary) !important;
    transition: .3s !important
}

.wcm-block-map-field,
.wcm-map-field {
    margin-bottom: 1.5em
}

.wcm-map-mount-point {
    width: 100%;
    clear: both;
    margin: 1em 0 1.5em
}

.wcm-block-map-field #wcm-map-wrapper,
.wcm-block-map-field .wcm-map-picker {
    margin: 0
}