.cph-country-switcher {
    display: none;
}

.cph-country-sr-only {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.checkout-index-index .cph-country-switcher,
.checkout-index-index .cph-country-overlay,
.checkout-cart-index .cph-country-switcher,
.checkout-cart-index .cph-country-overlay,
.checkout-klarna-index .cph-country-switcher,
.checkout-klarna-index .cph-country-overlay {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.checkout-index-index.cph-country-modal-open,
.checkout-cart-index.cph-country-modal-open,
.checkout-klarna-index.cph-country-modal-open {
    overflow: auto !important;
}

@media (max-width: 767px) {
    html,
    body,
    .page-wrapper {
        max-width: 100%;
        overflow-x: hidden;
    }

    .page-header,
    .header.content {
        background-color: transparent !important;
        position: relative;
    }

    .cph-country-modal-open {
        overflow: hidden;
    }

    .header-container .logo-wrapper--mobile,
    .logo-wrapper--mobile {
        --cph-country-slot: 76px;
        align-items: center;
        box-sizing: border-box;
        display: grid !important;
        grid-template-columns: var(--cph-country-slot) minmax(0, 1fr) var(--cph-country-slot);
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100%;
        padding: 0 12px;
        position: relative;
        text-align: center;
        width: 100% !important;
    }

    .logo-wrapper--mobile > .action.nav-toggle {
        grid-column: 1;
        justify-self: start;
    }

    .logo-wrapper--mobile > .logo {
        grid-column: 2;
        justify-self: center;
        min-width: 0;
    }

    .logo-wrapper--mobile > .logo img {
        height: auto;
        max-width: 100%;
    }

    .logo-wrapper--mobile > .cph-country-switcher {
        grid-column: 3;
        justify-self: end;
    }

    .cph-country-switcher {
        align-items: center;
        box-sizing: border-box;
        display: flex;
        justify-content: flex-end;
        margin: 0;
        max-width: none;
        position: static;
        transform: none;
        z-index: 80;
    }

    .cph-country-trigger {
        align-items: center;
        background: #ffffff;
        border: 0;
        border-radius: 999px;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
        color: #221f1b;
        display: inline-flex;
        gap: 5px;
        height: 38px;
        justify-content: center;
        min-width: 64px;
        padding: 0 10px;
    }

    .cph-country-trigger__icon {
        fill: none;
        height: 18px;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.8;
        width: 18px;
    }

    .cph-country-trigger__label {
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0;
        line-height: 1;
    }

    .cph-country-overlay {
        bottom: 0;
        left: 0;
        position: fixed;
        right: 0;
        top: 0;
        z-index: 10000;
    }

    .cph-country-overlay[hidden] {
        display: none;
    }

    .cph-country-backdrop {
        background: rgba(21, 19, 17, 0.42);
        border: 0;
        bottom: 0;
        left: 0;
        padding: 0;
        position: absolute;
        right: 0;
        top: 0;
        width: 100%;
    }

    .cph-country-dialog {
        background: #ffffff;
        border-radius: 28px 28px 0 0;
        bottom: 0;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.18);
        left: 0;
        max-height: 82vh;
        overflow: auto;
        padding: 38px 16px calc(18px + env(safe-area-inset-bottom));
        position: absolute;
        right: 0;
    }

    .cph-country-dialog::before {
        background: #d6d6d6;
        border-radius: 999px;
        content: "";
        height: 5px;
        left: 50%;
        position: absolute;
        top: 14px;
        transform: translateX(-50%);
        width: 58px;
    }

    .cph-country-dialog__header {
        align-items: flex-start;
        display: flex;
        gap: 14px;
        justify-content: space-between;
        margin-bottom: 14px;
    }

    .cph-country-dialog__eyebrow {
        color: #81786f;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0;
        line-height: 1.2;
        margin: 0 0 4px;
        text-transform: uppercase;
    }

    .cph-country-dialog__title {
        color: #221f1b;
        font-size: 21px;
        font-weight: 600;
        letter-spacing: 0;
        line-height: 1.2;
        margin: 0;
    }

    .cph-country-dialog__close {
        align-items: center;
        background: #f4f1ec;
        border: 1px solid #dfd8ce;
        border-radius: 50%;
        color: #221f1b;
        display: inline-flex;
        flex: 0 0 auto;
        font-size: 24px;
        height: 38px;
        justify-content: center;
        line-height: 1;
        padding: 0;
        width: 38px;
    }

    .cph-country-list {
        display: grid;
        gap: 8px;
    }

    .cph-country-option {
        align-items: center;
        background: #ffffff;
        border: 0;
        border-radius: 12px;
        color: #221f1b;
        display: flex;
        gap: 12px;
        min-height: 66px;
        padding: 12px;
        text-decoration: none;
    }

    .cph-country-option:focus,
    .cph-country-option:hover {
        border-color: #8d806f;
        color: #221f1b;
        text-decoration: none;
    }

    .cph-country-option.is-current {
        background: #edf6ff;
    }

    .cph-country-option__flag {
        align-items: center;
        background: #ebe5dc;
        border-radius: 50%;
        color: #221f1b;
        display: inline-flex;
        flex: 0 0 auto;
        font-size: 12px;
        font-weight: 700;
        height: 38px;
        justify-content: center;
        letter-spacing: 0;
        width: 38px;
    }

    .cph-country-option__text {
        display: grid;
        flex: 1 1 auto;
        gap: 3px;
        min-width: 0;
    }

    .cph-country-option__text strong,
    .cph-country-option__text small {
        display: block;
        overflow-wrap: anywhere;
    }

    .cph-country-option__text strong {
        font-size: 15px;
        font-weight: 600;
        line-height: 1.2;
    }

    .cph-country-option__text small {
        color: #6d665f;
        font-size: 12px;
        line-height: 1.3;
    }

    .cph-country-option__status {
        color: #5c7658;
        flex: 0 0 auto;
        font-size: 12px;
        font-weight: 700;
        line-height: 1;
    }
}
