.detox-header {
    position: fixed;
    top: 16px;
    right: 8px;
    left: 16px;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 54px;
    padding: 6px 64px 6px 8px;
    border: 1px solid rgba(15, 118, 110, .16);
    border-radius: 20px;
    background: linear-gradient(100deg, rgba(255, 255, 255, .96), rgba(236, 250, 244, .96));
    box-shadow: 0 10px 24px rgba(15, 118, 110, .09);
    pointer-events: none;
}

.detox-header > * {
    pointer-events: auto;
}

.detox-header-home {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 8px 0 3px;
    overflow: hidden;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 118, 110, .10);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.detox-header-name {
    color: #193b35;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.detox-header-home:hover,
.detox-header-home:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(15, 118, 110, .16);
}

.detox-header-home img {
    display: block;
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.detox-header-auth {
    min-width: 0;
    flex: 0 1 auto;
    order: 4;
    margin-left: auto;
    max-width: 100%;
}

.detox-header-language {
    order: 2;
    display: flex;
    overflow: hidden;
    flex: 0 0 auto;
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 12px;
    background: rgba(255, 255, 255, .82);
    font-size: 10px;
    font-weight: 700;
}

.detox-header-language a {
    padding: 6px 12px;
    color: #4b5563;
}

.detox-header-language a[aria-current="page"] {
    background: #0d9488;
    color: #fff;
}

.detox-header > .pwa-install-header-button {
    order: 3;
    flex: 0 0 auto;
}

.detox-header #login-modal-btn {
    border: 1px solid rgba(15, 118, 110, .14);
    box-shadow: 0 4px 10px rgba(15, 118, 110, .10);
}

@media (max-width: 640px) {
    .detox-header {
        top: 12px;
        right: 8px;
        left: 8px;
        gap: 4px;
        min-height: 48px;
        padding: 4px 58px 4px 6px;
        border-radius: 17px;
    }

    .detox-header-home {
        gap: 4px;
        height: 34px;
        padding: 0 6px 0 3px;
        border-radius: 10px;
    }

    .detox-header-home img {
        width: 26px;
        height: 26px;
    }

    .detox-header-name {
        font-size: 14px;
    }

    .detox-header-auth {
        max-width: 82px;
    }

    .detox-header #login-modal-btn {
        max-width: 82px;
        min-height: 38px;
        padding: 5px 6px;
        font-size: 10px;
        line-height: 14px;
        white-space: normal;
    }

    .detox-header-language a {
        padding-right: 6px;
        padding-left: 6px;
    }

    .detox-header #user-profile {
        flex-wrap: wrap;
        gap: 2px;
        padding: 4px 8px;
    }

    .detox-header #user-profile > div:first-child {
        min-width: 0;
        max-width: 100%;
    }

    .detox-header #user-email {
        max-width: 100%;
    }

    .detox-header #user-profile > div:first-child > div {
        flex-wrap: wrap;
        gap: 2px;
    }

    .detox-header #p-badge,
    .detox-header #btn-portal {
        padding-right: 2px;
        padding-left: 2px;
        font-size: 8px;
    }

    .detox-header #user-profile > div:nth-child(2) {
        display: none;
    }

    .detox-header #logout-btn {
        margin-left: 0;
    }
}

@media (max-width: 400px) {
    .detox-header-auth,
    .detox-header #login-modal-btn {
        max-width: 56px;
    }

    .detox-header #login-modal-btn {
        letter-spacing: normal;
    }
}

@media (max-width: 360px) {
    .detox-header {
        gap: 3px;
    }

    .detox-header-name {
        font-size: 12px;
    }

    .detox-header-home img {
        width: 22px;
        height: 22px;
    }

    .detox-header-language a {
        padding-right: 4px;
        padding-left: 4px;
    }

    .detox-header-auth,
    .detox-header #login-modal-btn {
        max-width: 46px;
    }
}
