#delivery-option-switch.js-delivery-method {
    position: relative;
    margin: 20px 0;
}

#delivery-option-switch.js-delivery-method.config-select {
    margin-bottom: 3em;
}

#delivery-option-switch .fieldset {
    position: relative;
    display: flex;
    height: 50px;
    max-width: 300px;
    border-radius: 50px;
    background-color: #f0f0f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#delivery-option-switch input[type="radio"] {
    display: none;
}

#delivery-option-switch label {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    margin-bottom: 0;
    border-radius: 50px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

#delivery-option-switch label span {
    font-size: 14px;
    font-weight: 500;
}

#delivery-option-switch .delivery_method_icon {
    width: 24px;
    height: 24px;
    margin-left: 8px;
}

#delivery-option-switch label.delivery_delivery_label svg {
    width: 100%;
    max-width: 34px;
    margin-left: 7px;
}

#delivery-option-switch .switch {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 1;
    width: calc(50% - 10px);
    height: calc(100% - 10px);
    border-radius: 50px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#delivery-option-switch input[value="option_delivery"]:checked ~ .switch {
    left: calc(50% + 5px);
    background-color: var(--wp--preset--color--primary);
}

#delivery-option-switch input[value="option_pickup"]:checked ~ .switch {
    left: 5px;
    background-color: var(--wp--preset--color--primary);
}

#delivery-option-switch input[value="option_pickup"]:checked ~ .delivery_pickup_label,
#delivery-option-switch input[value="option_delivery"]:checked ~ .delivery_delivery_label {
    color: #fff;
}

#delivery-option-switch.promote-pickup .delivery_pickup_label {
    position: relative;
}

#delivery-option-switch .discount-badge {
    position: absolute;
    top: -8px;
    left: 8px;
    z-index: 2;
    display: flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #ff9800;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

#delivery-option-switch .pickup-promo-text {
    position: absolute;
    top: 51px;
    display: inline-block;
    max-width: 144px;
    padding: 0 8px;
    margin-left: 6px;
    border-radius: 25px;
    background-color: #ff9800;
    color: #fff;
    font-size: 10px;
    text-align: left;
}

@media (max-width: 480px) {
    #delivery-option-switch .fieldset {
        max-width: 100%;
    }
}

.platform-delivery-modal {
    --platform-accent: #ff8000;
    --platform-accent-dark: #e67300;
}

.platform-delivery-modal.delivery-service-wolt {
    --platform-accent: #009de0;
    --platform-accent-dark: #0085bd;
}

.platform-delivery-modal.delivery-service-ubereats {
    --platform-accent: #0e8345;
    --platform-accent-dark: #0b6836;
}

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

.platform-delivery-modal:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    animation: bringmalPlatformModalFadeIn 0.25s ease-out;
}

.platform-delivery-modal.active {
    z-index: 1000000;
}

.platform-delivery-modal-content {
    position: relative;
    width: min(480px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 44px 36px 36px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
    text-align: center;
    animation: bringmalPlatformModalSlideUp 0.3s cubic-bezier(0.39, 0.575, 0.565, 1);
}

.platform-delivery-modal-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--platform-accent);
}

.platform-delivery-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #888;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.platform-delivery-modal-close:hover,
.platform-delivery-modal-close:focus-visible {
    background: #f0f0f0;
    color: #222;
}

.platform-delivery-modal-logo {
    display: flex;
    justify-content: center;
    margin: 0 0 20px;
}

.delivery-platform-logo {
    display: block;
    width: min(140px, 36vw);
    max-width: 140px;
    height: auto;
    padding: 16px;
    border-radius: 16px;
    background: #f7f7f7;
    object-fit: contain;
}

.platform-delivery-modal-eyebrow {
    margin: 0 0 4px;
    color: var(--platform-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.platform-delivery-modal-title {
    margin: 0 0 14px;
    color: #111;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 700;
    line-height: 1.2;
}

.platform-delivery-modal-message {
    margin: 0 0 28px;
    color: #555;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    text-align: center;
}

.platform-delivery-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.platform-delivery-modal-button {
    display: inline-flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.platform-delivery-modal-button:focus-visible,
.platform-delivery-modal-close:focus-visible {
    outline: 2px solid var(--platform-accent);
    outline-offset: 2px;
}

.platform-delivery-modal-button.platform {
    background: var(--platform-accent);
    color: #fff;
}

.platform-delivery-modal-button.platform:hover,
.platform-delivery-modal-button.platform:focus-visible {
    background: var(--platform-accent-dark);
    color: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    transform: translateY(-1px);
}

.platform-delivery-modal-button.pickup {
    border: 1.5px solid #ddd;
    background: transparent;
    color: #333;
}

.platform-delivery-modal-button.pickup:hover,
.platform-delivery-modal-button.pickup:focus-visible {
    border-color: #ccc;
    background: #f5f5f5;
}

@keyframes bringmalPlatformModalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bringmalPlatformModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

@media (max-width: 700px) {
    .platform-delivery-modal:not([hidden]) {
        align-items: flex-end;
        padding: 0;
    }

    .platform-delivery-modal-content {
        width: 100%;
        max-height: calc(100vh - 40px);
        padding: 36px 20px calc(24px + env(safe-area-inset-bottom));
        border-radius: 20px 20px 0 0;
        animation: bringmalPlatformModalSheetUp 0.3s cubic-bezier(0.39, 0.575, 0.565, 1);
    }

    .delivery-platform-logo {
        width: min(112px, 34vw);
        padding: 12px;
    }

    .platform-delivery-modal-message {
        margin-bottom: 22px;
        font-size: 15px;
    }
}

@keyframes bringmalPlatformModalSheetUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

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

@media (prefers-reduced-motion: reduce) {
    .platform-delivery-modal:not([hidden]),
    .platform-delivery-modal-content {
        animation: none;
    }

    .platform-delivery-modal-button.platform:hover,
    .platform-delivery-modal-button.platform:focus-visible {
        transform: none;
    }
}
