:root {
    --mh-delivery-primary: #ff6b14;
    --mh-delivery-text: #202b3c;
    --mh-delivery-muted: #667085;
    --mh-delivery-border: #d7dde6;
}

body.mh-delivery-modal-open {
    overflow: hidden;
}

.mh-delivery-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(13, 20, 31, 0.56);
    backdrop-filter: blur(3px);
}

.mh-delivery-overlay.is-open {
    display: flex;
}

.mh-delivery-modal {
    width: min(100%, 570px);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 34px 36px 36px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 28px 90px rgba(18, 29, 45, 0.26);
    color: var(--mh-delivery-text);
    text-align: center;
}

.mh-delivery-pin {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    background: #fff3e7;
    font-size: 30px;
    line-height: 1;
}

.mh-delivery-modal h2 {
    margin: 0 0 12px;
    color: var(--mh-delivery-text);
    font-size: clamp(28px, 4vw, 34px);
    font-weight: 700;
    line-height: 1.18;
}

.mh-delivery-subtitle {
    max-width: 470px;
    margin: 0 auto 34px;
    color: var(--mh-delivery-muted);
    font-size: 18px;
    line-height: 1.55;
}

#mh-delivery-form {
    text-align: left;
}

#mh-delivery-form label {
    display: block;
    margin: 0 0 10px;
    color: #151d2b;
    font-size: 17px;
    font-weight: 700;
}

#mh-delivery-area-select {
    width: 100%;
    min-height: 58px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 18px;
    border: 1px solid var(--mh-delivery-border);
    border-radius: 15px;
    background-color: #ffffff;
    color: #253044;
    font-size: 17px;
    outline: 0;
}

#mh-delivery-area-select:focus {
    border-color: var(--mh-delivery-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 20, 0.12);
}

.mh-delivery-submit {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 60px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    border: 0;
    border-radius: 999px;
    background: var(--mh-primary, #ff6b14);
    color: #ffffff;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
    box-shadow: 0 10px 25px rgba(255, 107, 20, 0.18);
}

.mh-delivery-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 28px rgba(255, 107, 20, 0.25);
}

.mh-delivery-submit:disabled {
    cursor: wait;
    opacity: .72;
}

.mh-delivery-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: mh-delivery-spin .7s linear infinite;
}

.mh-delivery-submit.is-loading .mh-delivery-spinner {
    display: inline-block;
}

@keyframes mh-delivery-spin {
    to { transform: rotate(360deg); }
}

.mh-delivery-message {
    display: none;
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    line-height: 1.4;
}

.mh-delivery-message.is-error {
    display: block;
    background: #ffe2e2;
    color: #d62c2c;
}

.mh-delivery-message.is-success {
    display: block;
    background: #e9f8ee;
    color: #14833b;
}

.mh-delivery-current-area {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mh-delivery-change-area {
    border: 0;
    padding: 0;
    background: transparent;
    color: #ff6b14;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .mh-delivery-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .mh-delivery-modal {
        width: 100%;
        max-height: 92vh;
        padding: 28px 22px 26px;
        border-radius: 26px 26px 0 0;
    }

    .mh-delivery-modal h2 {
        font-size: 28px;
    }

    .mh-delivery-subtitle {
        margin-bottom: 26px;
        font-size: 16px;
    }
}
